diff options
Diffstat (limited to 'xlators/storage/posix/src/posix-handle.h')
| -rw-r--r-- | xlators/storage/posix/src/posix-handle.h | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h index b12e8b9610c..621f8f4d450 100644 --- a/xlators/storage/posix/src/posix-handle.h +++ b/xlators/storage/posix/src/posix-handle.h @@ -142,6 +142,12 @@                  break;                                                  \          }                                                               \                                                                          \ +        if (strstr (loc->name, "../")) {                                \ +                gf_msg (this->name, GF_LOG_ERROR, 0, P_MSG_ENTRY_HANDLE_CREATE, \ +                        "'../' in name not allowed: (%s)", loc->name); \ +                op_ret = -1;                                            \ +                break;                                                  \ +        }                                                               \          if (LOC_HAS_ABSPATH (loc)) {                                    \                  MAKE_REAL_PATH (entp, this, loc->path);                 \                  __parp = strdupa (entp);                                \  | 
