From: Jeremy Allison Date: Tue, 18 Sep 2018 16:03:22 +0000 (-0700) Subject: s3: smbd: smb2-posix: Add SAMBA_XATTR_REPARSE_ATTRIB "user.SmbReparse" name. X-Git-Tag: tdb-1.4.11~869 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6526f20e42bcc533ad5c8a4c402622dc0a5c0fd8;p=thirdparty%2Fsamba.git s3: smbd: smb2-posix: Add SAMBA_XATTR_REPARSE_ATTRIB "user.SmbReparse" name. Ensure it's prohibited for normal user access. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/include/smb.h b/source3/include/smb.h index e47ccd66133..7f3482fe442 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -614,6 +614,8 @@ struct ea_list { #define SAMBA_XATTR_DOSSTREAM_PREFIX "user.DosStream." /* Prefix for xattrs storing streams. */ #define SAMBA_XATTR_MARKER "user.SAMBA_STREAMS" +/* EA to use to store reparse points. */ +#define SAMBA_XATTR_REPARSE_ATTRIB "user.SmbReparse" /* usershare error codes. */ enum usershare_err { diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 5198a04a74c..b43f8f6330a 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -164,6 +164,7 @@ bool samba_private_attr_name(const char *unix_ea_name) prohibited |= strequal(unix_ea_name, SAMBA_POSIX_INHERITANCE_EA_NAME); prohibited |= strequal(unix_ea_name, SAMBA_XATTR_DOS_ATTRIB); prohibited |= strequal(unix_ea_name, SAMBA_XATTR_MARKER); + prohibited |= strequal(unix_ea_name, SAMBA_XATTR_REPARSE_ATTRIB); prohibited |= strequal(unix_ea_name, XATTR_NTACL_NAME); prohibited |= strequal(unix_ea_name, AFPINFO_EA_NETATALK);