chase: Fix shortcut

We can't shortcut chaseat() if CHASE_PARENT is set.
This commit is contained in:
Daan De Meyer
2024-10-04 21:34:33 +02:00
parent 413d3ce1b7
commit 87333bd1dc
+1 -1
View File
@@ -192,7 +192,7 @@ int chaseat(int dir_fd, const char *path, ChaseFlags flags, char **ret_path, int
if (!(flags &
(CHASE_AT_RESOLVE_IN_ROOT|CHASE_NONEXISTENT|CHASE_NO_AUTOFS|CHASE_SAFE|CHASE_STEP|
CHASE_PROHIBIT_SYMLINKS|CHASE_MKDIR_0755)) &&
CHASE_PROHIBIT_SYMLINKS|CHASE_MKDIR_0755|CHASE_PARENT)) &&
!ret_path && ret_fd) {
/* Shortcut the ret_fd case if the caller isn't interested in the actual path and has no root