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:
Daan De Meyer
2026-05-12 14:43:39 +02:00
committed by Daan De Meyer
parent 1ea3359793
commit 452214c09b
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -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));
}