From: Volker Lendecke Date: Fri, 2 Dec 2022 09:06:31 +0000 (+0100) Subject: lib: Add symlink trust flags from dochelp X-Git-Tag: talloc-2.4.0~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7239d756290292f5056ea0235630e8413ef5960f;p=thirdparty%2Fsamba.git lib: Add symlink trust flags from dochelp Signed-off-by: Volker Lendecke Reviewed-by: David Mulder --- diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h index 876ea63f2b9..a08b1931277 100644 --- a/libcli/smb/smb_constants.h +++ b/libcli/smb/smb_constants.h @@ -624,4 +624,15 @@ enum csc_policy { */ #define SYMLINK_ERROR_TAG 0x4C4D5953 +/* + * Flags according to answer from Dochelp: + * https://lists.samba.org/archive/cifs-protocol/2022-November/003909.html + */ +#define SYMLINK_ADMIN 0x20000000 /* The symlink creator is an admin */ +#define SYMLINK_UNTRUSTED 0x10000000 /* The symlink creator is untrusted */ +#define SYMLINK_TRUST_UNKNOWN 0x00000000 /* The symlink creator is unknown/legacy */ + +#define SYMLINK_TRUST_MASK 0x30000000 /* Encodes the redirection trust level (maps to REDIRECTION_TRUST_LEVEL) */ +#define SYMLINK_TRUST_SHIFT 28 /* Bits to shift to convert to/from REDIRECTION_TRUST_LEVEL */ + #endif /* _SMB_CONSTANTS_H */