hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Sun Mar 4 11:38:17 PST 2007


 tools/hal-storage-mount.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

New commits:
diff-tree 42174283c756d377d2f1f2f346d32aec502d4769 (from da20ca8c49b76c0917bd822803b0b20ebf6aa280)
Author: David Zeuthen <davidz at redhat.com>
Date:   Sun Mar 4 14:34:34 2007 -0500

    Revert "without PolicyKit, allow only root to mount fixed disks"
    
    This reverts commit 9d607e21cac65dddaf0c8cb2443865d9ae509393.
    
    Conflicts:

diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
index 9cfe687..f9062fd 100644
--- a/tools/hal-storage-mount.c
+++ b/tools/hal-storage-mount.c
@@ -143,6 +143,7 @@ cannot_remount (const char *device)
 	exit (1);
 }
 
+#ifdef HAVE_POLKIT
 static void
 permission_denied_privilege (const char *privilege, const char *uid)
 {
@@ -150,7 +151,7 @@ permission_denied_privilege (const char 
 	fprintf (stderr, "%s refused uid %s\n", privilege, uid);
 	exit (1);
 }
-
+#endif
 
 /* borrowed from gtk/gtkfilesystemunix.c in GTK+ on 02/23/2006 */
 static void
@@ -771,12 +772,6 @@ handle_mount (LibHalContext *hal_ctx, 
 		printf ("caller don't possess privilege\n");
 		permission_denied_privilege (privilege, invoked_by_uid);
 	}
-#else
-        /* root can do everything; only allow handling removable devices
-         * without uid change to non-root users */
-        if (!invoked_by_uid || strcmp(invoked_by_uid, "0"))
-                if (!privilege || strcmp (privilege, "hal-storage-removable-mount"))
-                        permission_denied_privilege (privilege, invoked_by_uid);
 #endif
 
 #ifdef DEBUG


More information about the hal-commit mailing list