mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bruno Thomsen <bruno.thomsen@gmail.com>
To: ptxdist@pengutronix.de
Cc: Bruno Thomsen <bruno.thomsen@gmail.com>
Subject: [ptxdist] [PATCH] polkit: add pkexec install option
Date: Sat, 30 Apr 2022 13:37:24 +0200	[thread overview]
Message-ID: <20220430113724.6133-1-bruno.thomsen@gmail.com> (raw)

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




             reply	other threads:[~2022-04-30 11:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 11:37 Bruno Thomsen [this message]
2022-06-20  6:19 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20220430113724.6133-1-bruno.thomsen@gmail.com \
    --to=bruno.thomsen@gmail.com \
    --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