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

s3:smbd: add twrp args to filename_convert()

All existing callers pass NULL, no change in behaviour.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2018-11-24 10:45:49 +01:00
parent c69bd336a1
commit 14b6e6842b
9 changed files with 36 additions and 2 deletions

View File

@ -2363,6 +2363,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
r->in.file,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(nt_status)) {
werr = ntstatus_to_werror(nt_status);
@ -2496,6 +2497,7 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
r->in.file,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(nt_status)) {
werr = ntstatus_to_werror(nt_status);

View File

@ -1710,6 +1710,7 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx,
connection_struct *conn,
const char *name_in,
uint32_t ucf_flags,
time_t *twrp,
bool *ppath_contains_wcard,
struct smb_filename **pp_smb_fname)
{
@ -1718,7 +1719,7 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx,
NULL,
name_in,
ucf_flags,
NULL,
twrp,
ppath_contains_wcard,
pp_smb_fname);
}

View File

@ -543,6 +543,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
TALLOC_FREE(case_state);
@ -1115,6 +1116,7 @@ static void call_nt_transact_create(connection_struct *conn,
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
TALLOC_FREE(case_state);
@ -1636,6 +1638,7 @@ void reply_ntrename(struct smb_request *req)
oldname,
ucf_flags_src,
NULL,
NULL,
&smb_fname_old);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,
@ -1652,6 +1655,7 @@ void reply_ntrename(struct smb_request *req)
status = filename_convert(ctx, conn,
newname,
ucf_flags_dst,
NULL,
&dest_has_wcard,
&smb_fname_new);
if (!NT_STATUS_IS_OK(status)) {

View File

@ -5570,6 +5570,7 @@ NTSTATUS get_relative_fid_filename(connection_struct *conn,
new_base_name,
ucf_flags,
NULL,
NULL,
smb_fname_out);
if (!NT_STATUS_IS_OK(status)) {
goto out;

View File

@ -365,6 +365,7 @@ NTSTATUS filename_convert(TALLOC_CTX *mem_ctx,
connection_struct *conn,
const char *name_in,
uint32_t ucf_flags,
time_t *twrp,
bool *ppath_contains_wcard,
struct smb_filename **pp_smb_fname);
NTSTATUS filename_convert_with_privilege(TALLOC_CTX *mem_ctx,

View File

@ -1305,6 +1305,7 @@ void reply_checkpath(struct smb_request *req)
name,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
@ -1403,6 +1404,7 @@ void reply_getatr(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -1506,6 +1508,7 @@ void reply_setatr(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -1803,6 +1806,7 @@ void reply_search(struct smb_request *req)
nt_status = filename_convert(ctx, conn,
path,
ucf_flags,
NULL,
&mask_contains_wcard,
&smb_fname);
if (!NT_STATUS_IS_OK(nt_status)) {
@ -2146,6 +2150,7 @@ void reply_open(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -2318,6 +2323,7 @@ void reply_open_and_X(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -2562,6 +2568,7 @@ void reply_mknew(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -2698,6 +2705,7 @@ void reply_ctemp(struct smb_request *req)
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -3236,6 +3244,7 @@ void reply_unlink(struct smb_request *req)
status = filename_convert(ctx, conn,
name,
ucf_flags,
NULL,
&path_contains_wcard,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
@ -6185,6 +6194,7 @@ void reply_mkdir(struct smb_request *req)
directory,
ucf_flags,
NULL,
NULL,
&smb_dname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -6255,6 +6265,7 @@ void reply_rmdir(struct smb_request *req)
directory,
ucf_flags,
NULL,
NULL,
&smb_dname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -7377,6 +7388,7 @@ void reply_mv(struct smb_request *req)
conn,
name,
src_ucf_flags,
NULL,
&src_has_wcard,
&smb_fname_src);
@ -7394,6 +7406,7 @@ void reply_mv(struct smb_request *req)
conn,
newname,
dst_ucf_flags,
NULL,
&dest_has_wcard,
&smb_fname_dst);
@ -7687,6 +7700,7 @@ void reply_copy(struct smb_request *req)
status = filename_convert(ctx, conn,
fname_src,
ucf_flags_src,
NULL,
&source_has_wild,
&smb_fname_src);
if (!NT_STATUS_IS_OK(status)) {
@ -7702,6 +7716,7 @@ void reply_copy(struct smb_request *req)
status = filename_convert(ctx, conn,
fname_dst,
ucf_flags_dst,
NULL,
&dest_has_wild,
&smb_fname_dst);
if (!NT_STATUS_IS_OK(status)) {

View File

@ -423,7 +423,7 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req
ucf_flags = filename_create_ucf_flags(smb1req, FILE_OPEN);
status = filename_convert(talloc_tos(), fsp->conn,
filename, ucf_flags,
NULL, &smb_fname);
NULL, NULL, &smb_fname);
TALLOC_FREE(filename);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("filename_convert returned %s\n",
@ -891,6 +891,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
smb1req->conn,
state->fname,
ucf_flags,
NULL,
NULL, /* ppath_contains_wcards */
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {

View File

@ -428,6 +428,7 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
conn,
fullpath,
ucf_flags,
NULL,
&wcard_has_wild,
&smb_fname);

View File

@ -1296,6 +1296,7 @@ static void call_trans2open(connection_struct *conn,
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -2743,6 +2744,7 @@ close_if_end = %d requires_resume_key = %d backup_priv = %d level = 0x%x, max_da
ntstatus = filename_convert(talloc_tos(), conn,
directory,
ucf_flags,
NULL,
&mask_contains_wcard,
&smb_dname);
}
@ -5857,6 +5859,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -6695,6 +6698,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
oldname,
ucf_flags,
NULL,
NULL,
&smb_fname_old);
if (!NT_STATUS_IS_OK(status)) {
return status;
@ -6770,6 +6774,7 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
newname,
ucf_flags,
NULL,
NULL,
&smb_fname_dst);
if (!NT_STATUS_IS_OK(status)) {
return status;
@ -6880,6 +6885,7 @@ static NTSTATUS smb_file_link_information(connection_struct *conn,
newname,
ucf_flags,
NULL,
NULL,
&smb_fname_dst);
if (!NT_STATUS_IS_OK(status)) {
return status;
@ -8828,6 +8834,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
fname,
ucf_flags,
NULL,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@ -8977,6 +8984,7 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
directory,
ucf_flags,
NULL,
NULL,
&smb_dname);
if (!NT_STATUS_IS_OK(status)) {