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:
Ondrej Kozina
2018-02-27 11:38:36 +01:00
committed by Milan Broz
parent 8cd9db272f
commit 6d22ba9f87

View File

@@ -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;