Commit 6d22ba9f authored by Ondrej Kozina's avatar Ondrej Kozina Committed by Milan Broz

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'.
parent 8cd9db27
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment