1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3: smbd: Add srvstr_get_path_posix().

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>
This commit is contained in:
Jeremy Allison 2015-12-22 13:18:03 -08:00
parent 5740761e78
commit c78d73986d
2 changed files with 36 additions and 0 deletions

View 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);

View 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)