* [ptxdist] [PATCH] util-linux: add option for building setpriv
@ 2025-11-27 7:41 Holger Assmann
2025-12-04 13:14 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Holger Assmann @ 2025-11-27 7:41 UTC (permalink / raw)
To: ptxdist; +Cc: Holger Assmann
The util-linux implementation of setpriv vastly differs from the one
already provided by busybox: Whilst the latter one only provides
functionality to act on certain Linux capabilities, the version by
util-linux also allows for more sophisticated operations like UID/GID
management or environment handling.
Signed-off-by: Holger Assmann <h.assmann@pengutronix.de>
---
rules/util-linux.in | 11 +++++++++++
rules/util-linux.make | 3 ++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/rules/util-linux.in b/rules/util-linux.in
index 6ff817997..5f7fbd269 100644
--- a/rules/util-linux.in
+++ b/rules/util-linux.in
@@ -5,6 +5,7 @@ menuconfig UTIL_LINUX
prompt "util-linux "
select GCCLIBS_GCC_S
select LIBC_CRYPT if UTIL_LINUX_SULOGIN
+ select LIBCAP_NG if UTIL_LINUX_SETPRIV
select HOST_MESON
select UTIL_LINUX_LIBBLKID
select UTIL_LINUX_LIBUUID if UTIL_LINUX_MKSWAP_UUID
@@ -555,6 +556,16 @@ config UTIL_LINUX_SWAPON
comment "BusyBox' swapon is selected!"
depends on BUSYBOX_SWAPON
+config UTIL_LINUX_SETPRIV
+ bool
+ depends on !BUSYBOX_SETPRIV
+ prompt "setpriv"
+ help
+ Run a program with different Linux privilege settings.
+
+comment "BusyBox' setpriv is selected!"
+ depends on BUSYBOX_SETPRIV
+
config UTIL_LINUX_SETSID
bool
depends on !BUSYBOX_SETSID
diff --git a/rules/util-linux.make b/rules/util-linux.make
index bcf36b195..9e7f0f2f0 100644
--- a/rules/util-linux.make
+++ b/rules/util-linux.make
@@ -143,7 +143,7 @@ UTIL_LINUX_CONF_OPT := \
-Dbuild-script=disabled \
-Dbuild-scriptutils=disabled \
-Dbuild-setarch=disabled \
- -Dbuild-setpriv=disabled \
+ -Dbuild-setpriv=$(call ptx/endis, PTXCONF_UTIL_LINUX_SETPRIV)d \
-Dbuild-setterm=$(call ptx/endis, PTXCONF_UTIL_LINUX_SETTERM)d \
-Dbuild-su=disabled \
-Dbuild-sulogin=$(call ptx/endis, PTXCONF_UTIL_LINUX_SULOGIN)d \
@@ -271,6 +271,7 @@ UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_READPROFILE) += sbin/readprofile
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_RFKILL) += sbin/rfkill
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SWAPON) += sbin/swapoff sbin/swapon
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_PIPESZ) += bin/pipesz
+UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SETPRIV) += bin/setpriv
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SETSID) += bin/setsid
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SWITCH_ROOT) += sbin/switch_root
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_UMOUNT) += bin/umount
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] util-linux: add option for building setpriv
2025-11-27 7:41 [ptxdist] [PATCH] util-linux: add option for building setpriv Holger Assmann
@ 2025-12-04 13:14 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2025-12-04 13:14 UTC (permalink / raw)
To: ptxdist; +Cc: Holger Assmann
Thanks, applied as 4d550a475b5b4eb91ab2faaaacd76b821a7c356e.
Michael
[sent from post-receive hook]
On Thu, 04 Dec 2025 14:14:58 +0100, Holger Assmann <h.assmann@pengutronix.de> wrote:
> The util-linux implementation of setpriv vastly differs from the one
> already provided by busybox: Whilst the latter one only provides
> functionality to act on certain Linux capabilities, the version by
> util-linux also allows for more sophisticated operations like UID/GID
> management or environment handling.
>
> Signed-off-by: Holger Assmann <h.assmann@pengutronix.de>
> Message-Id: <20251127074110.3943109-1-h.assmann@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/util-linux.in b/rules/util-linux.in
> index 6ff817997130..5f7fbd2698c4 100644
> --- a/rules/util-linux.in
> +++ b/rules/util-linux.in
> @@ -5,6 +5,7 @@ menuconfig UTIL_LINUX
> prompt "util-linux "
> select GCCLIBS_GCC_S
> select LIBC_CRYPT if UTIL_LINUX_SULOGIN
> + select LIBCAP_NG if UTIL_LINUX_SETPRIV
> select HOST_MESON
> select UTIL_LINUX_LIBBLKID
> select UTIL_LINUX_LIBUUID if UTIL_LINUX_MKSWAP_UUID
> @@ -555,6 +556,16 @@ config UTIL_LINUX_SWAPON
> comment "BusyBox' swapon is selected!"
> depends on BUSYBOX_SWAPON
>
> +config UTIL_LINUX_SETPRIV
> + bool
> + depends on !BUSYBOX_SETPRIV
> + prompt "setpriv"
> + help
> + Run a program with different Linux privilege settings.
> +
> +comment "BusyBox' setpriv is selected!"
> + depends on BUSYBOX_SETPRIV
> +
> config UTIL_LINUX_SETSID
> bool
> depends on !BUSYBOX_SETSID
> diff --git a/rules/util-linux.make b/rules/util-linux.make
> index bcf36b195f9a..9e7f0f2f0c0c 100644
> --- a/rules/util-linux.make
> +++ b/rules/util-linux.make
> @@ -143,7 +143,7 @@ UTIL_LINUX_CONF_OPT := \
> -Dbuild-script=disabled \
> -Dbuild-scriptutils=disabled \
> -Dbuild-setarch=disabled \
> - -Dbuild-setpriv=disabled \
> + -Dbuild-setpriv=$(call ptx/endis, PTXCONF_UTIL_LINUX_SETPRIV)d \
> -Dbuild-setterm=$(call ptx/endis, PTXCONF_UTIL_LINUX_SETTERM)d \
> -Dbuild-su=disabled \
> -Dbuild-sulogin=$(call ptx/endis, PTXCONF_UTIL_LINUX_SULOGIN)d \
> @@ -271,6 +271,7 @@ UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_READPROFILE) += sbin/readprofile
> UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_RFKILL) += sbin/rfkill
> UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SWAPON) += sbin/swapoff sbin/swapon
> UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_PIPESZ) += bin/pipesz
> +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SETPRIV) += bin/setpriv
> UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SETSID) += bin/setsid
> UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_SWITCH_ROOT) += sbin/switch_root
> UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_UMOUNT) += bin/umount
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-04 13:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-27 7:41 [ptxdist] [PATCH] util-linux: add option for building setpriv Holger Assmann
2025-12-04 13:14 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox