Revert "chase: invert CHASE_NO_AUTOFS and only set it where needed"
This reverts commit 490aa05ca1.
As commented https://github.com/systemd/systemd/pull/38569#discussion_r2284978273,
the commit makes autofs check bypassed. Before the commit, when
CHASE_NO_AUTOFS is set, we did not shortcut chasing paths, and refused
any autofs mount points in the path. However, with the commit, the flag
was swapped but even when CHASE_AUTOFS is unset, the autofs check may be
skipped.
To fix the issue, rather than swapping the flag, we should introduce
another flag, say CHASE_TRIGGER_AUTOFS. This revert the commit, and in a
later commit, the new flag will be introduced.
This commit is contained in:
@@ -176,7 +176,7 @@ static int verify_trusted_image_fd_by_path(int fd) {
|
||||
struct stat stb;
|
||||
const char *e;
|
||||
|
||||
r = chase(s, NULL, CHASE_SAFE|CHASE_AUTOFS, &q, &dir_fd);
|
||||
r = chase(s, NULL, CHASE_SAFE, &q, &dir_fd);
|
||||
if (r == -ENOENT)
|
||||
continue;
|
||||
if (r < 0) {
|
||||
@@ -194,7 +194,7 @@ static int verify_trusted_image_fd_by_path(int fd) {
|
||||
if (!filename_is_valid(e))
|
||||
continue;
|
||||
|
||||
r = chaseat(dir_fd, e, CHASE_SAFE|CHASE_AUTOFS, NULL, &inode_fd);
|
||||
r = chaseat(dir_fd, e, CHASE_SAFE, NULL, &inode_fd);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Couldn't verify that specified image '%s' is in search path '%s': %m", p, s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user