From 6d22ba9f872634728a2382f34d6cf65c889a1642 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Tue, 27 Feb 2018 11:38:36 +0100 Subject: [PATCH] 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'. --- lib/utils_device_locking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils_device_locking.c b/lib/utils_device_locking.c index c5f7e033..d081392b 100644 --- a/lib/utils_device_locking.c +++ b/lib/utils_device_locking.c @@ -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;