dlm: master - dlm_controld: fix modes for run dir and file

David Teigland teigland at fedoraproject.org
Tue Nov 6 21:55:14 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=f15a2daed7137481c7161e1447b1796c308c7e08
Commit:        f15a2daed7137481c7161e1447b1796c308c7e08
Parent:        499cb28a0c53c96b9d58d0b63de0d599ad549baf
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Tue Nov 6 15:40:00 2012 -0600
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Tue Nov 6 15:40:00 2012 -0600

dlm_controld: fix modes for run dir and file

dir should be 775 and file 644

Signed-off-by: David Teigland <teigland at redhat.com>
---
 dlm_controld/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index 91fbc4f..a68e1b8 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -1107,7 +1107,7 @@ static int lockfile(const char *dir, const char *name)
 	int fd, rv;
 
 	old_umask = umask(0022);
-	rv = mkdir(dir, 0777);
+	rv = mkdir(dir, 0775);
 	if (rv < 0 && errno != EEXIST) {
 		umask(old_umask);
 		return rv;
@@ -1116,7 +1116,7 @@ static int lockfile(const char *dir, const char *name)
 
 	snprintf(path, PATH_MAX, "%s/%s", dir, name);
 
-	fd = open(path, O_CREAT|O_WRONLY|O_CLOEXEC, 0666);
+	fd = open(path, O_CREAT|O_WRONLY|O_CLOEXEC, 0644);
 	if (fd < 0) {
 		log_error("lockfile open error %s: %s",
 			  path, strerror(errno));


More information about the cluster-commits mailing list