]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Add symlink trust flags from dochelp
authorVolker Lendecke <vl@samba.org>
Fri, 2 Dec 2022 09:06:31 +0000 (10:06 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 5 Dec 2022 15:06:32 +0000 (15:06 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
libcli/smb/smb_constants.h

index 876ea63f2b9b03c1d3352030f64c5dfb21792e54..a08b1931277ac871b2b47e064e83a83873c1ea55 100644 (file)
@@ -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 */