From 3991f35fbd6a7840169dc5233bfae54b9f302ccc Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 5 Jun 2023 14:47:42 +0900 Subject: chase: handle root path more carefully in chase_and_open() chase_and_open() may be called with relative root path. --- src/basic/chase.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/basic/chase.h') 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); -- cgit v1.2.3