[Ocfs2-tools-devel] libocfs2: specify mode with O_CREAT open

Mark Fasheh mark.fasheh at oracle.com
Thu Feb 21 15:53:48 PST 2008


Without this, we'll fail to build when _FORTIFY_SOURCE is defined

Signed-off-by: Mark Fasheh <mark.fasheh at oracle.com>
---
 libocfs2/ismounted.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libocfs2/ismounted.c b/libocfs2/ismounted.c
index c6ddf31..83b4d83 100644
--- a/libocfs2/ismounted.c
+++ b/libocfs2/ismounted.c
@@ -153,7 +153,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
 is_root:
 #define TEST_FILE "/.ismount-test-file"		
 		*mount_flags |= OCFS2_MF_ISROOT;
-		fd = open(TEST_FILE, O_RDWR|O_CREAT);
+		fd = open(TEST_FILE, O_RDWR|O_CREAT, 0600);
 		if (fd < 0) {
 			if (errno == EROFS)
 				*mount_flags |= OCFS2_MF_READONLY;
-- 
1.5.3.6




More information about the Ocfs2-tools-devel mailing list