mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
User more restrictive attributes for device file lock.
This commit is contained in:
@@ -134,7 +134,7 @@ static int open_resource(struct crypt_device *cd, const char *res)
|
||||
return -EINVAL;
|
||||
|
||||
log_dbg(cd, "Opening lock resource file %s/%s", DEFAULT_LUKS2_LOCK_PATH, res);
|
||||
r = openat(lockdir_fd, res, O_CREAT | O_NOFOLLOW | O_RDWR | O_CLOEXEC, 0777);
|
||||
r = openat(lockdir_fd, res, O_CREAT|O_NOFOLLOW|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
|
||||
err = errno;
|
||||
|
||||
close(lockdir_fd);
|
||||
|
||||
Reference in New Issue
Block a user