summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-05-18 12:18:58 -0700
committerJeremy Allison <jra@samba.org>2017-05-22 18:41:15 +0200
commit0fbf5b644d67df2bd47691f4240dbcaffaecc407 (patch)
tree5d9c42b4f7a14763db9aecd8bf2905cdcadfe450 /source3/smbd
parent29ec4744542230c93c209acfe2a5d6144707b332 (diff)
downloadsamba-0fbf5b644d67df2bd47691f4240dbcaffaecc407.tar.gz
s3: smbd: Add UCF_DFS_PATHNAME which tracks the flags2 FLAGS2_DFS_PATHNAMES bit.
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>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/filename.c9
-rw-r--r--source3/smbd/smbd.h5
2 files changed, 12 insertions, 2 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index b334816f134..cb0ce57df28 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -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;
diff --git a/source3/smbd/smbd.h b/source3/smbd/smbd.h
index e147bad3f7c..d372c7ed771 100644
--- a/source3/smbd/smbd.h
+++ b/source3/smbd/smbd.h
@@ -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 */