diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-06-23 09:32:59 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-06-23 10:01:23 +0900 |
commit | c3ba2db48b1ab53fb459910eef50a7ccbb624e17 (patch) | |
tree | dcf5de103d378d204eadec4680b9f00c62ab4179 /file.c | |
parent | 61374839e4132aec92e00eb8d2fdb0619a0307cf (diff) |
Removed execpath argument of path_check_0 as always TRUE now
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -6155,7 +6155,7 @@ rb_is_absolute_path(const char *path) #if ENABLE_PATH_CHECK static int -path_check_0(VALUE path, int execpath) +path_check_0(VALUE path) { struct stat st; const char *p0 = StringValueCStr(path); @@ -6183,12 +6183,12 @@ path_check_0(VALUE path, int execpath) #endif if (STAT(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH) #ifdef S_ISVTX - && !(p && execpath && (st.st_mode & S_ISVTX)) + && !(p && (st.st_mode & S_ISVTX)) #endif && !access(p0, W_OK)) { - rb_enc_warn(enc, "Insecure world writable dir %s in %sPATH, mode 0%" + rb_enc_warn(enc, "Insecure world writable dir %s in PATH, mode 0%" PRI_MODET_PREFIX"o", - p0, (execpath ? "" : "LOAD_"), st.st_mode); + p0, st.st_mode); if (p) *p = '/'; RB_GC_GUARD(path); return 0; @@ -6218,7 +6218,7 @@ rb_path_check(const char *path) if (!p) p = pend; for (;;) { - if (!path_check_0(rb_str_new(p0, p - p0), TRUE)) { + if (!path_check_0(rb_str_new(p0, p - p0))) { return 0; /* not safe */ } p0 = p + 1; |