[sheepdog] [PATCH 1/3] journal: remove using octal constant as the journal file permission

Hitoshi Mitake mitake.hitoshi at gmail.com
Sun Apr 28 19:08:05 CEST 2013


Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 sheep/journal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sheep/journal.c b/sheep/journal.c
index 92f7fa1..9ca1ce6 100644
--- a/sheep/journal.c
+++ b/sheep/journal.c
@@ -66,7 +66,7 @@ static int create_journal_file(const char *root, const char *name)
 	char path[PATH_MAX];
 
 	snprintf(path, sizeof(path), "%s/%s", root, name);
-	fd = open(path, flags, 0644);
+	fd = open(path, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 	if (fd < 0) {
 		sd_eprintf("open %s %m", name);
 		return -1;
-- 
1.7.10.rc0.41.gfa678




More information about the sheepdog mailing list