diff options
author | Tulsi Jain <[email protected]> | 2019-06-13 08:56:15 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-06-13 08:56:15 -0700 |
commit | 9c7da9a95aaaecced0a1cfc40190906e7a691327 (patch) | |
tree | d60bad72f7c6fb38bfcdd375d50a78f2eb8a2d5c /include | |
parent | 3475724ea4221a354633d7c4e50d9d90f6bd266f (diff) |
Restrict filesystem creation if name referred either '.' or '..'
This change restricts filesystem creation if the given name
contains either '.' or '..'
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Elling <[email protected]>
Signed-off-by: TulsiJain <[email protected]>
Closes #8842
Closes #8564
Diffstat (limited to 'include')
-rw-r--r-- | include/zfs_namecheck.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/zfs_namecheck.h b/include/zfs_namecheck.h index 527db92b0..56d3d36f0 100644 --- a/include/zfs_namecheck.h +++ b/include/zfs_namecheck.h @@ -43,6 +43,8 @@ typedef enum { NAME_ERR_RESERVED, /* entire name is reserved */ NAME_ERR_DISKLIKE, /* reserved disk name (c[0-9].*) */ NAME_ERR_TOOLONG, /* name is too long */ + NAME_ERR_SELF_REF, /* reserved self path name ('.') */ + NAME_ERR_PARENT_REF, /* reserved parent path name ('..') */ NAME_ERR_NO_AT, /* permission set is missing '@' */ } namecheck_err_t; |