From: Jeremy Allison Date: Thu, 18 May 2017 18:56:39 +0000 (-0700) Subject: s3: smbd: Split out ucf_flags_from_smb_request() from filename_create_ucf_flags(). X-Git-Tag: ldb-1.1.30~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5866c66a44703000edf99ecae4429e877332ccd;p=thirdparty%2Fsamba.git s3: smbd: Split out ucf_flags_from_smb_request() from filename_create_ucf_flags(). We will use this elsewhere in later commits. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 36717a6e60c..b334816f134 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -30,7 +30,7 @@ #include "smbd/smbd.h" #include "smbd/globals.h" -uint32_t filename_create_ucf_flags(struct smb_request *req, uint32_t create_disposition) +uint32_t ucf_flags_from_smb_request(struct smb_request *req) { uint32_t ucf_flags = 0; @@ -38,6 +38,15 @@ uint32_t filename_create_ucf_flags(struct smb_request *req, uint32_t create_disp ucf_flags |= UCF_POSIX_PATHNAMES; } + return ucf_flags; +} + +uint32_t filename_create_ucf_flags(struct smb_request *req, uint32_t create_disposition) +{ + uint32_t ucf_flags = 0; + + ucf_flags |= ucf_flags_from_smb_request(req); + switch (create_disposition) { case FILE_OPEN: case FILE_OVERWRITE: diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 770c3c24994..65994364b08 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -338,6 +338,7 @@ int fsp_stat(files_struct *fsp); /* The following definitions come from smbd/filename.c */ +uint32_t ucf_flags_from_smb_request(struct smb_request *req); uint32_t filename_create_ucf_flags(struct smb_request *req, uint32_t create_disposition); NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn,