Skip to contentSkip to conversation

provide missing mode for open-create in check_mntent_file

PATCH In review Eric Sandeen 2 participants 3 messages Aug 16, 2007 – Oct 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 provide missing mode for open-create in check_mntent_file

F8 is catching opens with O_CREAT flags and no mode now, and refusing to build them...

lib/ext2fs/ismounted.c +1 -1
Index: e2fsprogs-git/lib/ext2fs/ismounted.c
===================================================================
@@ -147,7 +147,7 @@ static errcode_t check_mntent_file(const
 is_root:
 #define TEST_FILE "/.ismount-test-file"		
 		*mount_flags |= EXT2_MF_ISROOT;
-		fd = open(TEST_FILE, O_RDWR|O_CREAT);
+		fd = open(TEST_FILE, O_RDWR|O_CREAT, 0644);
 		if (fd < 0) {
 			if (errno == EROFS)
 				*mount_flags |= EXT2_MF_READONLY;
#1 lore raw
Quoted 2 lines · Eric Sandeen

F8 is catching opens with O_CREAT flags and no mode now, and refusing to build them...

Yay, we had bugs-o-plenty in Lustre because of this being done in apps.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

#2 lore raw
In reply to Eric Sandeen
Quoted 2 lines · Eric Sandeen

F8 is catching opens with O_CREAT flags and no mode now, and refusing to build them...

Ping? I don't see this in git yet.

Thanks,
-Eric

Quoted 21 lines

Index: e2fsprogs-git/lib/ext2fs/ismounted.c
===================================================================

lib/ext2fs/ismounted.c +1 -2
@@ -147,7 +147,7 @@ static errcode_t check_mntent_file(const
 is_root:
 #define TEST_FILE "/.ismount-test-file"		
 		*mount_flags |= EXT2_MF_ISROOT;
-		fd = open(TEST_FILE, O_RDWR|O_CREAT);
+		fd = open(TEST_FILE, O_RDWR|O_CREAT, 0644);
 		if (fd < 0) {
 			if (errno == EROFS)
 				*mount_flags |= EXT2_MF_READONLY;
 
 
-

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html