chase: Use ELOOP for CHASE_PROHIBIT_SYMLINKS error
Matches the behavior of openat2() with RESOLVE_NO_SYMLINKS which makes introducing support for openat2() easier.
This commit is contained in:
committed by
Daan De Meyer
parent
1ea3359793
commit
452214c09b
+2
-2
@@ -139,11 +139,11 @@ static int log_prohibited_symlink(int fd, ChaseFlags flags) {
|
||||
assert(fd >= 0);
|
||||
|
||||
if (!FLAGS_SET(flags, CHASE_WARN))
|
||||
return -EREMCHG;
|
||||
return -ELOOP;
|
||||
|
||||
(void) fd_get_path(fd, &n1);
|
||||
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EREMCHG),
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(ELOOP),
|
||||
"Detected symlink where no symlink is allowed at '%s', refusing.",
|
||||
strna(n1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user