mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Allow symbolic links in locking path.
Allow symbolic links in the initial part of locking path. If /run/x/y/crypsetup is locking path, starting with 'run' anything may be symbolic link up to (including) 'y'.
This commit is contained in:
committed by
Milan Broz
parent
8cd9db272f
commit
6d22ba9f87
@@ -73,7 +73,7 @@ static int open_lock_dir(struct crypt_device *cd, const char *dir, const char *b
|
||||
{
|
||||
int dirfd, lockdfd;
|
||||
|
||||
dirfd = open(dir, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC);
|
||||
dirfd = open(dir, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
|
||||
if (dirfd < 0) {
|
||||
log_dbg("Failed to open directory '%s': (%d: %s).", dir, errno, strerror(errno));
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user