Hello community, here is the log from the commit of package polkit for openSUSE:Factory checked in at 2018-03-12 12:03:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/polkit (Old) and /work/SRC/openSUSE:Factory/.polkit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "polkit" Mon Mar 12 12:03:04 2018 rev:60 rq:585102 version:0.113 Changes: -------- --- /work/SRC/openSUSE:Factory/polkit/polkit.changes 2018-03-07 10:28:43.091376324 +0100 +++ /work/SRC/openSUSE:Factory/.polkit.new/polkit.changes 2018-03-12 12:03:08.605901306 +0100 @@ -1,0 +2,5 @@ +Thu Mar 1 11:23:00 UTC 2018 - [email protected] + +- pkexec.patch: pkexec: allow --version and --help even if not setuid + +------------------------------------------------------------------- New: ---- pkexec.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ polkit.spec ++++++ --- /var/tmp/diff_new_pack.oQSuUr/_old 2018-03-12 12:03:10.341839095 +0100 +++ /var/tmp/diff_new_pack.oQSuUr/_new 2018-03-12 12:03:10.341839095 +0100 @@ -38,6 +38,8 @@ Patch3: polkit-gettext.patch # PATCH-FEATURE-UPSTREAM polkit-itstools.patch [email protected] -- Add gettext support for .policy files, taken from git Patch4: polkit-itstools.patch +# PATCH-FIX-UPSTREAM pkexec.patch [email protected] -- pkexec: allow --version and --help even if not setuid +Patch5: pkexec.patch # needed for patch1 BuildRequires: autoconf # needed for patch1 @@ -136,6 +138,7 @@ %patch2 -p1 -R %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build export V=1 ++++++ pkexec.patch ++++++ From: Andreas Schwab <[email protected]> Subject: pkexec: allow --version and --help even if not setuid Don't check for setuid invocation until after parsing command line, to allow running uninstalled pkexec with --help or --version. This also helps building packages that want to check for pkexec in an emulated environment that does not support setuid invocation (eg. QEMU linux-user). Index: polkit-0.113/src/programs/pkexec.c =================================================================== --- polkit-0.113.orig/src/programs/pkexec.c +++ polkit-0.113/src/programs/pkexec.c @@ -503,27 +503,6 @@ main (int argc, char *argv[]) opt_user = NULL; local_agent_handle = NULL; - /* check for correct invocation */ - if (geteuid () != 0) - { - g_printerr ("pkexec must be setuid root\n"); - goto out; - } - - original_user_name = g_strdup (g_get_user_name ()); - if (original_user_name == NULL) - { - g_printerr ("Error getting user name.\n"); - goto out; - } - - if ((original_cwd = g_get_current_dir ()) == NULL) - { - g_printerr ("Error getting cwd: %s\n", - g_strerror (errno)); - goto out; - } - /* First process options and find the command-line to invoke. Avoid using fancy library routines * that depend on environtment variables since we haven't cleared the environment just yet. */ @@ -579,6 +558,27 @@ main (int argc, char *argv[]) goto out; } + /* check for correct invocation */ + if (geteuid () != 0) + { + g_printerr ("pkexec must be setuid root\n"); + goto out; + } + + original_user_name = g_strdup (g_get_user_name ()); + if (original_user_name == NULL) + { + g_printerr ("Error getting user name.\n"); + goto out; + } + + if ((original_cwd = g_get_current_dir ()) == NULL) + { + g_printerr ("Error getting cwd: %s\n", + g_strerror (errno)); + goto out; + } + if (opt_user == NULL) opt_user = g_strdup ("root");
