diff options
author | 2008-03-17 17:55:10 +0100 | |
---|---|---|
committer | 2008-03-17 17:55:10 +0100 | |
commit | 4def1a96299eefc1a836f5d5505c2e2903b54705 (patch) | |
tree | 5330f6001d9a40674f5e38926e9e644a6c5554fc | |
parent | properly escape the UDI (diff) | |
download | gentoo-hal-4def1a96299eefc1a836f5d5505c2e2903b54705.tar.gz gentoo-hal-4def1a96299eefc1a836f5d5505c2e2903b54705.tar.bz2 gentoo-hal-4def1a96299eefc1a836f5d5505c2e2903b54705.zip |
fix for the acl-list patch change
Change of the acl-list path to /var/run/hal from commit
6f55096eaa340632d189002f4778cdb91c6684e9 [1] didn't actually have much
sense, since /var/run/hald is already being created.
Moreover, /var/lib/hal is no longer used, and thus there's no need to
created it.
-rw-r--r-- | tools/Makefile.am | 5 | ||||
-rw-r--r-- | tools/hal-acl-tool.c | 22 |
2 files changed, 11 insertions, 16 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index cab521ee..ae03edd7 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -220,10 +220,5 @@ check: fi; \ done; -install-data-local: - -$(mkdir_p) $(DESTDIR)$(localstatedir)/lib/hal - -chown $(HAL_USER):$(HAL_GROUP) $(DESTDIR)$(localstatedir)/lib/hal - -chmod 0700 $(DESTDIR)$(localstatedir)/lib/hal - clean-local : rm -f *~ diff --git a/tools/hal-acl-tool.c b/tools/hal-acl-tool.c index 2f9a0153..d01a069b 100644 --- a/tools/hal-acl-tool.c +++ b/tools/hal-acl-tool.c @@ -37,7 +37,7 @@ /* How this works (or "An introduction to this code") * - * - all ACL's granted by this tool is kept in /var/run/hal/acl-list + * - all ACL's granted by this tool is kept in /var/run/hald/acl-list * See below for the format. * * - every time tool is launched we read this file and keep each line @@ -82,7 +82,7 @@ * */ -/* Each entry here represents a line in the /var/run/hal/acl-list file +/* Each entry here represents a line in the /var/run/hald/acl-list file * of ACL's that have been set by HAL and as such are currently * applied * @@ -220,7 +220,7 @@ acl_apply_changes (GSList *new_acl_list, gboolean only_update_acllist, gboolean * * The variable 'only_update_acllist' is set to TRUE only on * device_remove events. It effectively means "only update the - * /var/run/hal/acl-list, do not apply ACL's on disk". So this + * /var/run/hald/acl-list, do not apply ACL's on disk". So this * is done for systems where /dev is dynamic and we know for * sure that the device file is gone. * @@ -258,7 +258,7 @@ acl_apply_changes (GSList *new_acl_list, gboolean only_update_acllist, gboolean } /* success; now atomically set the new list */ - g_file_set_contents (PACKAGE_LOCALSTATEDIR "/run/hal/acl-list", + g_file_set_contents (PACKAGE_LOCALSTATEDIR "/run/hald/acl-list", new_acl_file_contents, strlen (new_acl_file_contents), NULL); @@ -360,9 +360,9 @@ get_current_acl_list (GSList **l) f = NULL; ret = FALSE; - f = fopen (PACKAGE_LOCALSTATEDIR "/run/hal/acl-list", "r"); + f = fopen (PACKAGE_LOCALSTATEDIR "/run/hald/acl-list", "r"); if (f == NULL) { - printf ("%d: cannot open " PACKAGE_LOCALSTATEDIR "/run/hal/acl-list\n", getpid ()); + printf ("%d: cannot open " PACKAGE_LOCALSTATEDIR "/run/hald/acl-list\n", getpid ()); goto out; } @@ -1154,11 +1154,11 @@ acl_lock (void) if (lock_acl_fd >= 0) return TRUE; - printf ("%d: attempting to get lock on " PACKAGE_LOCALSTATEDIR "/run/hal/acl-list\n", getpid ()); + printf ("%d: attempting to get lock on " PACKAGE_LOCALSTATEDIR "/run/hald/acl-list\n", getpid ()); - lock_acl_fd = open (PACKAGE_LOCALSTATEDIR "/run/hal/acl-list", O_CREAT | O_RDWR, 0644); + lock_acl_fd = open (PACKAGE_LOCALSTATEDIR "/run/hald/acl-list", O_CREAT | O_RDWR, 0644); if (lock_acl_fd < 0) { - printf ("%d: error opening/creating " PACKAGE_LOCALSTATEDIR "/run/hal/acl-list\n", getpid ()); + printf ("%d: error opening/creating " PACKAGE_LOCALSTATEDIR "/run/hald/acl-list\n", getpid ()); return FALSE; } @@ -1177,7 +1177,7 @@ tryagain: printf ("\n"); printf ("****************************************************\n"); - printf ("%d: got lock on " PACKAGE_LOCALSTATEDIR "/run/hal/acl-list\n", getpid ()); + printf ("%d: got lock on " PACKAGE_LOCALSTATEDIR "/run/hald/acl-list\n", getpid ()); return TRUE; } @@ -1186,7 +1186,7 @@ acl_unlock (void) { printf ("\n"); printf ("****************************************************\n"); - printf ("%d: releasing lock on " PACKAGE_LOCALSTATEDIR "/run/hal/acl-list\n", getpid ()); + printf ("%d: releasing lock on " PACKAGE_LOCALSTATEDIR "/run/hald/acl-list\n", getpid ()); #if sun lockf (lock_acl_fd, F_ULOCK, 0); #else |