diff options
author | Luca Boccassi <bluca@debian.org> | 2024-07-19 11:01:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 11:01:01 +0200 |
commit | 68d939350f78f9b09f21bf7fb282f3d3d0814e60 (patch) | |
tree | 396aae39d00eb20eb98028c32231204498b0a1c7 /src/shared | |
parent | Merge pull request #33770 from bluca/polkit-root (diff) | |
parent | homed: open blob dir with O_PATH (diff) | |
download | systemd-68d939350f78f9b09f21bf7fb282f3d3d0814e60.tar.xz systemd-68d939350f78f9b09f21bf7fb282f3d3d0814e60.zip |
Merge pull request #33591 from teknoraver/o_path
use O_PATH when possible
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/switch-root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c index e64b6f6c8f..621161a1c0 100644 --- a/src/shared/switch-root.c +++ b/src/shared/switch-root.c @@ -58,7 +58,7 @@ int switch_root(const char *new_root, if (old_root_fd < 0) return log_error_errno(errno, "Failed to open root directory: %m"); - new_root_fd = open(new_root, O_DIRECTORY|O_CLOEXEC); + new_root_fd = open(new_root, O_PATH|O_DIRECTORY|O_CLOEXEC); if (new_root_fd < 0) return log_error_errno(errno, "Failed to open target directory '%s': %m", new_root); |