diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-06-05 07:47:42 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-06-05 08:50:46 +0200 |
commit | 3991f35fbd6a7840169dc5233bfae54b9f302ccc (patch) | |
tree | 05b926be12d28ffae589aeeb50989e657199df92 /src/basic/chase.h | |
parent | test: move intro() near DEFINE_TEST_MAIN_WITH_INTRO() (diff) | |
download | systemd-3991f35fbd6a7840169dc5233bfae54b9f302ccc.tar.xz systemd-3991f35fbd6a7840169dc5233bfae54b9f302ccc.zip |
chase: handle root path more carefully in chase_and_open()
chase_and_open() may be called with relative root path.
Diffstat (limited to 'src/basic/chase.h')
-rw-r--r-- | src/basic/chase.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/chase.h b/src/basic/chase.h index f37e836822..cfc714b9f7 100644 --- a/src/basic/chase.h +++ b/src/basic/chase.h @@ -43,6 +43,7 @@ bool unsafe_transition(const struct stat *a, const struct stat *b); int chase(const char *path_with_prefix, const char *root, ChaseFlags chase_flags, char **ret_path, int *ret_fd); int chaseat_prefix_root(const char *path, const char *root, char **ret); +int chase_extract_filename(const char *path, const char *root, char **ret); int chase_and_open(const char *path, const char *root, ChaseFlags chase_flags, int open_flags, char **ret_path); int chase_and_opendir(const char *path, const char *root, ChaseFlags chase_flags, char **ret_path, DIR **ret_dir); |