Even root may not have all privileges by default. Application try to obtain
missing privileges via authentication then and fail as polkit-grant-helper
refuses to work as root. Therefore also allow root to obtain privileges via
authentication.

Signed-off-by: Ludwig Nussel <[EMAIL PROTECTED]>

---
 src/polkit-grant/polkit-grant-helper.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/polkit-grant/polkit-grant-helper.c 
b/src/polkit-grant/polkit-grant-helper.c
index cdfa710..e601db4 100644
--- a/src/polkit-grant/polkit-grant-helper.c
+++ b/src/polkit-grant/polkit-grant-helper.c
@@ -589,10 +589,12 @@ main (int argc, char *argv[])
 
         /* check user */
         invoking_user_id = getuid ();
+#if 0   /* some people are crazy enough to log in as root */
         if (invoking_user_id == 0) {
                 fprintf (stderr, "polkit-grant-helper: it only makes sense to 
run polkit-grant-helper as non-root\n");
                 goto out;
         }
+#endif
 
         /* check that we are setgid polkituser */
         egid = getegid ();
-- 
1.5.6

_______________________________________________
polkit-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/polkit-devel

Reply via email to