s3: smbd: Add srvstr_get_path_posix().
authorJeremy Allison <jra@samba.org>
Tue, 22 Dec 2015 21:18:03 +0000 (13:18 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 23 Dec 2015 17:23:16 +0000 (18:23 +0100)
Not yet used, will be plumbed into existing callers of srvstr_get_path()
when lp_posix_pathnames() is true.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
source3/smbd/proto.h
source3/smbd/reply.c

index af41d66..847a191 100644 (file)
@@ -864,6 +864,14 @@ size_t srvstr_get_path(TALLOC_CTX *ctx,
                        size_t src_len,
                        int flags,
                        NTSTATUS *err);
+size_t srvstr_get_path_posix(TALLOC_CTX *ctx,
+                       const char *inbuf,
+                       uint16_t smb_flags2,
+                       char **pp_dest,
+                       const char *src,
+                       size_t src_len,
+                       int flags,
+                       NTSTATUS *err);
 size_t srvstr_get_path_req_wcard(TALLOC_CTX *mem_ctx, struct smb_request *req,
                                 char **pp_dest, const char *src, int flags,
                                 NTSTATUS *err, bool *contains_wcard);
index 9173130..104151c 100644 (file)
@@ -391,6 +391,34 @@ size_t srvstr_get_path(TALLOC_CTX *ctx,
        }
 }
 
+/****************************************************************************
+ Pull a string and check the path - provide for error return.
+ posix_pathnames version.
+****************************************************************************/
+
+size_t srvstr_get_path_posix(TALLOC_CTX *ctx,
+                       const char *base_ptr,
+                       uint16_t smb_flags2,
+                       char **pp_dest,
+                       const char *src,
+                       size_t src_len,
+                       int flags,
+                       NTSTATUS *err)
+{
+       bool ignore;
+       return srvstr_get_path_wcard_internal(ctx,
+                       base_ptr,
+                       smb_flags2,
+                       pp_dest,
+                       src,
+                       src_len,
+                       flags,
+                       true,
+                       err,
+                       &ignore);
+}
+
+
 size_t srvstr_get_path_req_wcard(TALLOC_CTX *mem_ctx, struct smb_request *req,
                                 char **pp_dest, const char *src, int flags,
                                 NTSTATUS *err, bool *contains_wcard)