From 9c7da9a95aaaecced0a1cfc40190906e7a691327 Mon Sep 17 00:00:00 2001 From: Tulsi Jain Date: Thu, 13 Jun 2019 08:56:15 -0700 Subject: Restrict filesystem creation if name referred either '.' or '..' This change restricts filesystem creation if the given name contains either '.' or '..' Reviewed-by: Matt Ahrens Reviewed-by: Brian Behlendorf Reviewed-by: Richard Elling Signed-off-by: TulsiJain Closes #8842 Closes #8564 --- include/zfs_namecheck.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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; -- cgit v1.2.3