]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Add UCF_DFS_PATHNAME which tracks the flags2 FLAGS2_DFS_PATHNAMES bit.
authorJeremy Allison <jra@samba.org>
Thu, 18 May 2017 19:18:58 +0000 (12:18 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 22 May 2017 16:41:15 +0000 (18:41 +0200)
Set inside ucf_flags_from_smb_request(). This will allow us to
remove the req->flags2 & FLAGS2_DFS_PATHNAMES parameter from
filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/smbd/filename.c
source3/smbd/smbd.h

index b334816f1344be1584db3c6a3f49f6ba6461ac76..cb0ce57df28107b065677bf3aaa001488f8a58b8 100644 (file)
@@ -34,8 +34,13 @@ uint32_t ucf_flags_from_smb_request(struct smb_request *req)
 {
        uint32_t ucf_flags = 0;
 
-       if (req != NULL && req->posix_pathnames) {
-               ucf_flags |= UCF_POSIX_PATHNAMES;
+       if (req != NULL) {
+               if (req->posix_pathnames) {
+                       ucf_flags |= UCF_POSIX_PATHNAMES;
+               }
+               if (req->flags2 & FLAGS2_DFS_PATHNAMES) {
+                       ucf_flags |= UCF_DFS_PATHNAME;
+               }
        }
 
        return ucf_flags;
index e147bad3f7cd446c860aec6468069972fc47d0bf..d372c7ed7718d3507e999e62166a0596be813058 100644 (file)
@@ -74,5 +74,10 @@ struct trans_state {
 #define UCF_POSIX_PATHNAMES            0x00000008
 #define UCF_UNIX_NAME_LOOKUP           0x00000010
 #define UCF_PREP_CREATEFILE            0x00000020
+/*
+ * Use the same bit as FLAGS2_DFS_PATHNAMES
+ * which means the same thing.
+ */
+#define UCF_DFS_PATHNAME               0x00001000
 
 #endif /* _SMBD_SMBD_H */