mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Holger Assmann <h.assmann@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] util-linux: add option for building setpriv
Date: Thu,  4 Dec 2025 14:14:58 +0100	[thread overview]
Message-ID: <20251204131458.2197737-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20251127074110.3943109-1-h.assmann@pengutronix.de>

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



      reply	other threads:[~2025-12-04 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  7:41 [ptxdist] [PATCH] " Holger Assmann
2025-12-04 13:14 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251204131458.2197737-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=h.assmann@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox