e2fsprogs/e2fsprogs-1.40.2-fix-open-create-modes.patch

14 lines
525 B
Diff
Raw Normal View History

Index: e2fsprogs-1.40.2/lib/ext2fs/ismounted.c
===================================================================
--- e2fsprogs-1.40.2.orig/lib/ext2fs/ismounted.c
+++ e2fsprogs-1.40.2/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;