PolicyKit: Branch 'master' - 3 commits

David Zeuthen david at kemper.freedesktop.org
Thu Aug 9 13:41:43 PDT 2007


 polkit-grant/polkit-grant-helper.c |    7 +++++++
 polkit/Makefile.am                 |    5 +++--
 tools/polkit-grant.c               |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
diff-tree 7034e0c24e37963d72a50371ed6ad6a51a740d02 (from 5795bf6b779d6e6e0ae87d7d912a5bcefaec580b)
Author: David Zeuthen <davidz at redhat.com>
Date:   Thu Aug 9 16:39:16 2007 -0400

    when granting privileges, touch the /var/lib/PolicyKit/reload file
    
    This means that all libpolkit-using processes should recieve a
    config_changed() callback whenever privileges are granted.
    
    Remember to update your RPM spec files etc. such that group polkituser
    (or equiv.) is permitted to write to the reload file.

diff --git a/polkit-grant/polkit-grant-helper.c b/polkit-grant/polkit-grant-helper.c
index 426839c..049d10c 100644
--- a/polkit-grant/polkit-grant-helper.c
+++ b/polkit-grant/polkit-grant-helper.c
@@ -39,6 +39,7 @@
 #include <syslog.h>
 #include <errno.h>
 #include <string.h>
+#include <utime.h>
 
 #include <glib.h>
 
@@ -552,6 +553,12 @@ main (int argc, char *argv[])
                 goto out;
         }
 
+        /* touch the /var/lib/PolicyKit/reload file */
+        if (utime (PACKAGE_LOCALSTATE_DIR "/lib/PolicyKit/reload", NULL) != 0) {
+                fprintf (stderr, "polkit-grant-helper: cannot touch " PACKAGE_LOCALSTATE_DIR "/lib/PolicyKit/reload: %s\n", strerror (errno));
+        }
+
+
         ret = 0;
 out:
 #ifdef PGH_DEBUG
diff-tree 5795bf6b779d6e6e0ae87d7d912a5bcefaec580b (from 1e9a533c9c44e8c421bc9f48017258aab21adde5)
Author: David Zeuthen <davidz at redhat.com>
Date:   Thu Aug 9 16:37:36 2007 -0400

    make the /var/lib/PolicyKit/reload writable for group polkituser

diff --git a/polkit/Makefile.am b/polkit/Makefile.am
index 78ebec6..8099be8 100644
--- a/polkit/Makefile.am
+++ b/polkit/Makefile.am
@@ -72,6 +72,7 @@ install-data-local:
 	-chown $(POLKIT_USER):$(POLKIT_GROUP) $(DESTDIR)$(localstatedir)/run/PolicyKit
 	-chmod 775 $(DESTDIR)$(localstatedir)/lib/PolicyKit
 	-chmod 775 $(DESTDIR)$(localstatedir)/run/PolicyKit
-	touch $(DESTDIR)$(localstatedir)/lib/PolicyKit/reload
-	-chmod 755 $(DESTDIR)$(localstatedir)/lib/PolicyKit/reload
+	-touch $(DESTDIR)$(localstatedir)/lib/PolicyKit/reload
+	-chown :$(POLKIT_GROUP) $(DESTDIR)$(localstatedir)/lib/PolicyKit/reload
+	-chmod 664 $(DESTDIR)$(localstatedir)/lib/PolicyKit/reload
 
diff-tree 1e9a533c9c44e8c421bc9f48017258aab21adde5 (from 2e3b7bd46951ea51804f1b3848d2f9034176b152)
Author: David Zeuthen <davidz at redhat.com>
Date:   Thu Aug 9 12:37:55 2007 -0400

    use correct type for conversation_done() function
    
    fix proposed by Danny Kukawka <danny.kukawka at web.de>

diff --git a/tools/polkit-grant.c b/tools/polkit-grant.c
index b83c7d3..24a2ca7 100644
--- a/tools/polkit-grant.c
+++ b/tools/polkit-grant.c
@@ -219,7 +219,7 @@ conversation_override_grant_type (PolKit
 }
 
 static void 
-conversation_done (PolKitGrant *polkit_grant, polkit_bool_t gained_privilege, void *user_data)
+conversation_done (PolKitGrant *polkit_grant, polkit_bool_t gained_privilege, polkit_bool_t invalid_data, void *user_data)
 {
         UserData *ud = user_data;
         ud->gained_privilege = gained_privilege;


More information about the hal-commit mailing list