* [ptxdist] [PATCH] polkit: add pkexec install option
@ 2022-04-30 11:37 Bruno Thomsen
2022-06-20 6:19 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Bruno Thomsen @ 2022-04-30 11:37 UTC (permalink / raw)
To: ptxdist; +Cc: Bruno Thomsen
Disable default install of pkexec SUID binary as it's an old way of
executing a command as another user or with elevated privileges.
Fedora will also avoid installing pkexec[1], and put it in an optional
compat RPM package.
[1] https://fedoraproject.org/wiki/Changes/polkit_recommends_pkla_pkexec
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
rules/polkit.in | 10 ++++++++++
rules/polkit.make | 2 ++
2 files changed, 12 insertions(+)
diff --git a/rules/polkit.in b/rules/polkit.in
index 6085fbf783d6..8227cafbcaf8 100644
--- a/rules/polkit.in
+++ b/rules/polkit.in
@@ -29,4 +29,14 @@ config POLKIT_SYSTEMD
help
Use systemd for session tracking, else ConsoleKit is used
+comment "install options ---"
+
+config POLKIT_PKEXEC
+ bool
+ prompt "Install pkexec"
+ help
+ pkexec - Execute a command as another user or with elevated privileges.
+
+ Old and obsolete tool. Use 'sudo' for this kind of task.
+
endif
diff --git a/rules/polkit.make b/rules/polkit.make
index 4fa8d9c0edb1..368fbe3e4d3c 100644
--- a/rules/polkit.make
+++ b/rules/polkit.make
@@ -96,7 +96,9 @@ endif
@$(call install_copy, polkit, 0, 0, 0755, -, /usr/libexec/polkitd)
# binaries with suid
+ifdef PTXCONF_POLKIT_PKEXEC
@$(call install_copy, polkit, 0, 0, 4755, -, /usr/bin/pkexec)
+endif
@$(call install_copy, polkit, 0, 0, 4755, -, \
/usr/libexec/polkit-agent-helper-1)
base-commit: 6695ca9ed25a2e4792b8ab9ac38879a4c1939d52
--
2.35.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] polkit: add pkexec install option
2022-04-30 11:37 [ptxdist] [PATCH] polkit: add pkexec install option Bruno Thomsen
@ 2022-06-20 6:19 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2022-06-20 6:19 UTC (permalink / raw)
To: ptxdist; +Cc: Bruno Thomsen
Thanks, applied as 0bbd0652f102aa42186ca1eb27fce5a0d4dc9d52.
Michael
[sent from post-receive hook]
On Mon, 20 Jun 2022 08:19:25 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Disable default install of pkexec SUID binary as it's an old way of
> executing a command as another user or with elevated privileges.
>
> Fedora will also avoid installing pkexec[1], and put it in an optional
> compat RPM package.
>
> [1] https://fedoraproject.org/wiki/Changes/polkit_recommends_pkla_pkexec
>
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20220430113724.6133-1-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/polkit.in b/rules/polkit.in
> index 6085fbf783d6..8227cafbcaf8 100644
> --- a/rules/polkit.in
> +++ b/rules/polkit.in
> @@ -29,4 +29,14 @@ config POLKIT_SYSTEMD
> help
> Use systemd for session tracking, else ConsoleKit is used
>
> +comment "install options ---"
> +
> +config POLKIT_PKEXEC
> + bool
> + prompt "Install pkexec"
> + help
> + pkexec - Execute a command as another user or with elevated privileges.
> +
> + Old and obsolete tool. Use 'sudo' for this kind of task.
> +
> endif
> diff --git a/rules/polkit.make b/rules/polkit.make
> index 4fa8d9c0edb1..368fbe3e4d3c 100644
> --- a/rules/polkit.make
> +++ b/rules/polkit.make
> @@ -96,7 +96,9 @@ endif
> @$(call install_copy, polkit, 0, 0, 0755, -, /usr/libexec/polkitd)
>
> # binaries with suid
> +ifdef PTXCONF_POLKIT_PKEXEC
> @$(call install_copy, polkit, 0, 0, 4755, -, /usr/bin/pkexec)
> +endif
> @$(call install_copy, polkit, 0, 0, 4755, -, \
> /usr/libexec/polkit-agent-helper-1)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-20 6:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 11:37 [ptxdist] [PATCH] polkit: add pkexec install option Bruno Thomsen
2022-06-20 6:19 ` [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