diff options
-rw-r--r-- | safepath.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -208,16 +208,9 @@ static int abs_path_check(const char *abspath) * Non-root cannot access that symlink, and so is safe from it. */ char *sabspath = simplify_path(abspath); - - if (geteuid() == 0) { - if (regexec(&bad_proc_rx, sabspath, 0, NULL, 0) == 0) { - free(sabspath); - return 0; - } - } - + int res = regexec(&bad_proc_rx, sabspath, 0, NULL, 0); free(sabspath); - return 1; + return res != 0; } static int safepath_err(int eno) |