From eb7198f9991c5baba241dd2897107ba80dd6a817 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 22 Dec 2015 13:07:49 -0800 Subject: [PATCH] s3: smbd: Add srvstr_get_path_wcard_posix(). Allows us to call this directly and eventually remove the lp_posix_pathnames() call from inside of srvstr_get_path_wcard(). Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- source3/smbd/proto.h | 9 +++++++++ source3/smbd/reply.c | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 55e828649b7..af41d666ccd 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -847,6 +847,15 @@ size_t srvstr_get_path_wcard(TALLOC_CTX *ctx, int flags, NTSTATUS *err, bool *contains_wcard); +size_t srvstr_get_path_wcard_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, + bool *contains_wcard); size_t srvstr_get_path(TALLOC_CTX *ctx, const char *inbuf, uint16_t smb_flags2, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index c4438c8b30b..cb1fc555f2d 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -325,6 +325,33 @@ size_t srvstr_get_path_wcard(TALLOC_CTX *ctx, contains_wcard); } +/**************************************************************************** + Pull a string and check the path allowing a wilcard - provide for error return. + posix_pathnames version. +****************************************************************************/ + +size_t srvstr_get_path_wcard_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 *contains_wcard) +{ + return srvstr_get_path_wcard_internal(ctx, + base_ptr, + smb_flags2, + pp_dest, + src, + src_len, + flags, + true, + err, + contains_wcard); +} + /**************************************************************************** Pull a string and check the path - provide for error return. ****************************************************************************/ -- 2.34.1