aboutsummaryrefslogtreecommitdiffstats
path: root/libmount/src
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/src')
-rw-r--r--libmount/src/lock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libmount/src/lock.c b/libmount/src/lock.c
index 708e6a5754..cbc74a6034 100644
--- a/libmount/src/lock.c
+++ b/libmount/src/lock.c
@@ -146,7 +146,7 @@ static int lock_simplelock(struct libmnt_lock *ml)
const char *lfile;
int rc;
struct stat sb;
- const mode_t lock_mask = S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH;
+ const mode_t lock_mask = S_IRUSR|S_IWUSR;
assert(ml);
@@ -161,8 +161,7 @@ static int lock_simplelock(struct libmnt_lock *ml)
sigprocmask(SIG_BLOCK, &sigs, &ml->oldsigmask);
}
- ml->lockfile_fd = open(lfile, O_RDONLY|O_CREAT|O_CLOEXEC,
- S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH);
+ ml->lockfile_fd = open(lfile, O_RDONLY|O_CREAT|O_CLOEXEC, lock_mask);
if (ml->lockfile_fd < 0) {
rc = -errno;
goto err;