[PATCH] fix open() use in hal-acl-tool

Joe Orton jorton at redhat.com
Thu Aug 9 00:32:57 PDT 2007


This is caught by the new glibc open-as-macro feature (as a build 
failure): is 0644 appropriate or this file?

* tools/hal-acl-tool.c (acl_lock): Pass permissions to open().

--- hal-0.5.10/tools/hal-acl-tool.c.macropen
+++ hal-0.5.10/tools/hal-acl-tool.c
@@ -1149,7 +1149,7 @@
 
 	printf ("%d: attempting to get lock on " PACKAGE_LOCALSTATEDIR "/lib/hal/acl-list\n", getpid ());
 
-	lock_acl_fd = open (PACKAGE_LOCALSTATEDIR "/lib/hal/acl-list", O_CREAT | O_RDWR);
+	lock_acl_fd = open (PACKAGE_LOCALSTATEDIR "/lib/hal/acl-list", O_CREAT | O_RDWR, 0644);
 	if (lock_acl_fd < 0) {
 		printf ("%d: error opening/creating " PACKAGE_LOCALSTATEDIR "/lib/hal/acl-list\n", getpid ());
 		return FALSE;


More information about the hal mailing list