mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
s3: Explicitly pass flags2 to clistr_pull_talloc
Required to eventually make cli_list async
This commit is contained in:
parent
1cbe8b85ae
commit
61fb8a4fd1
@ -2646,7 +2646,8 @@ size_t clistr_pull_fn(const char *function,
|
|||||||
size_t clistr_pull_talloc_fn(const char *function,
|
size_t clistr_pull_talloc_fn(const char *function,
|
||||||
unsigned int line,
|
unsigned int line,
|
||||||
TALLOC_CTX *ctx,
|
TALLOC_CTX *ctx,
|
||||||
const char *inbuf,
|
const char *base,
|
||||||
|
uint16_t flags2,
|
||||||
char **pp_dest,
|
char **pp_dest,
|
||||||
const void *src,
|
const void *src,
|
||||||
int src_len,
|
int src_len,
|
||||||
|
@ -146,9 +146,9 @@ size_t __unsafe_string_function_usage_here_char__(void);
|
|||||||
clistr_pull_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, \
|
clistr_pull_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, \
|
||||||
inbuf, dest, src, dest_len, src_len, flags)
|
inbuf, dest, src, dest_len, src_len, flags)
|
||||||
|
|
||||||
#define clistr_pull_talloc(ctx, inbuf, pp_dest, src, src_len, flags) \
|
#define clistr_pull_talloc(ctx, base, flags2, pp_dest, src, src_len, flags) \
|
||||||
clistr_pull_talloc_fn(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, \
|
clistr_pull_talloc_fn(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, \
|
||||||
ctx, inbuf, pp_dest, src, src_len, flags)
|
ctx, base, flags2, pp_dest, src, src_len, flags)
|
||||||
|
|
||||||
#define srvstr_push(base_ptr, smb_flags2, dest, src, dest_len, flags) \
|
#define srvstr_push(base_ptr, smb_flags2, dest, src, dest_len, flags) \
|
||||||
srvstr_push_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, \
|
srvstr_push_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, \
|
||||||
|
@ -717,6 +717,7 @@ bool cli_dfs_get_referral(TALLOC_CTX *ctx,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
clistr_pull_talloc(ctx, cli->inbuf,
|
clistr_pull_talloc(ctx, cli->inbuf,
|
||||||
|
SVAL(cli->inbuf, smb_flg2),
|
||||||
&referrals[i].dfspath,
|
&referrals[i].dfspath,
|
||||||
p+node_offset, -1,
|
p+node_offset, -1,
|
||||||
STR_TERMINATE|STR_UNICODE);
|
STR_TERMINATE|STR_UNICODE);
|
||||||
|
@ -5022,8 +5022,9 @@ static void cli_notify_done(struct tevent_req *subreq)
|
|||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
uint8_t *params;
|
uint8_t *params;
|
||||||
uint32_t i, ofs, num_params;
|
uint32_t i, ofs, num_params;
|
||||||
|
uint16_t flags2;
|
||||||
|
|
||||||
status = cli_trans_recv(subreq, talloc_tos(), NULL, NULL, 0, NULL,
|
status = cli_trans_recv(subreq, talloc_tos(), &flags2, NULL, 0, NULL,
|
||||||
¶ms, 0, &num_params, NULL, 0, NULL);
|
¶ms, 0, &num_params, NULL, 0, NULL);
|
||||||
TALLOC_FREE(subreq);
|
TALLOC_FREE(subreq);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
@ -5068,8 +5069,8 @@ static void cli_notify_done(struct tevent_req *subreq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
state->changes[i].action = IVAL(params, ofs+4);
|
state->changes[i].action = IVAL(params, ofs+4);
|
||||||
ret = clistr_pull_talloc(params, (char *)params, &name,
|
ret = clistr_pull_talloc(params, (char *)params, flags2,
|
||||||
params+ofs+12, len,
|
&name, params+ofs+12, len,
|
||||||
STR_TERMINATE|STR_UNICODE);
|
STR_TERMINATE|STR_UNICODE);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
TALLOC_FREE(params);
|
TALLOC_FREE(params);
|
||||||
|
@ -46,6 +46,8 @@ static size_t calc_next_entry_offset(const char *base, const char *pdata_end)
|
|||||||
static size_t interpret_long_filename(TALLOC_CTX *ctx,
|
static size_t interpret_long_filename(TALLOC_CTX *ctx,
|
||||||
struct cli_state *cli,
|
struct cli_state *cli,
|
||||||
int level,
|
int level,
|
||||||
|
const char *base_ptr,
|
||||||
|
uint16_t recv_flags2,
|
||||||
const char *p,
|
const char *p,
|
||||||
const char *pdata_end,
|
const char *pdata_end,
|
||||||
struct file_info *finfo,
|
struct file_info *finfo,
|
||||||
@ -101,7 +103,8 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
|
|||||||
between win2000 and win9x for this call
|
between win2000 and win9x for this call
|
||||||
(tridge) */
|
(tridge) */
|
||||||
ret = clistr_pull_talloc(ctx,
|
ret = clistr_pull_talloc(ctx,
|
||||||
cli->inbuf,
|
base_ptr,
|
||||||
|
recv_flags2,
|
||||||
&finfo->name,
|
&finfo->name,
|
||||||
p,
|
p,
|
||||||
len+2,
|
len+2,
|
||||||
@ -133,7 +136,8 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
|
|||||||
return pdata_end - base;
|
return pdata_end - base;
|
||||||
}
|
}
|
||||||
ret = clistr_pull_talloc(ctx,
|
ret = clistr_pull_talloc(ctx,
|
||||||
cli->inbuf,
|
base_ptr,
|
||||||
|
recv_flags2,
|
||||||
&finfo->name,
|
&finfo->name,
|
||||||
p,
|
p,
|
||||||
len,
|
len,
|
||||||
@ -194,7 +198,8 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
|
|||||||
return pdata_end - base;
|
return pdata_end - base;
|
||||||
}
|
}
|
||||||
ret = clistr_pull_talloc(ctx,
|
ret = clistr_pull_talloc(ctx,
|
||||||
cli->inbuf,
|
base_ptr,
|
||||||
|
recv_flags2,
|
||||||
&finfo->name,
|
&finfo->name,
|
||||||
p,
|
p,
|
||||||
namelen,
|
namelen,
|
||||||
@ -408,6 +413,8 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
|
|||||||
p2 += interpret_long_filename(frame,
|
p2 += interpret_long_filename(frame,
|
||||||
cli,
|
cli,
|
||||||
info_level,
|
info_level,
|
||||||
|
cli->inbuf,
|
||||||
|
SVAL(cli->inbuf, smb_flg2),
|
||||||
p2,
|
p2,
|
||||||
rdata_end,
|
rdata_end,
|
||||||
&finfo,
|
&finfo,
|
||||||
@ -478,6 +485,8 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
|
|||||||
p += interpret_long_filename(frame,
|
p += interpret_long_filename(frame,
|
||||||
cli,
|
cli,
|
||||||
info_level,
|
info_level,
|
||||||
|
cli->inbuf,
|
||||||
|
SVAL(cli->inbuf, smb_flg2),
|
||||||
p,
|
p,
|
||||||
rdata_end,
|
rdata_end,
|
||||||
&finfo,
|
&finfo,
|
||||||
@ -523,6 +532,7 @@ static bool interpret_short_filename(TALLOC_CTX *ctx,
|
|||||||
finfo->size = IVAL(p,26);
|
finfo->size = IVAL(p,26);
|
||||||
ret = clistr_pull_talloc(ctx,
|
ret = clistr_pull_talloc(ctx,
|
||||||
cli->inbuf,
|
cli->inbuf,
|
||||||
|
SVAL(cli->inbuf, smb_flg2),
|
||||||
&finfo->name,
|
&finfo->name,
|
||||||
p+30,
|
p+30,
|
||||||
12,
|
12,
|
||||||
|
@ -68,7 +68,8 @@ size_t clistr_pull_fn(const char *function,
|
|||||||
size_t clistr_pull_talloc_fn(const char *function,
|
size_t clistr_pull_talloc_fn(const char *function,
|
||||||
unsigned int line,
|
unsigned int line,
|
||||||
TALLOC_CTX *ctx,
|
TALLOC_CTX *ctx,
|
||||||
const char *inbuf,
|
const char *base,
|
||||||
|
uint16_t flags2,
|
||||||
char **pp_dest,
|
char **pp_dest,
|
||||||
const void *src,
|
const void *src,
|
||||||
int src_len,
|
int src_len,
|
||||||
@ -77,8 +78,8 @@ size_t clistr_pull_talloc_fn(const char *function,
|
|||||||
return pull_string_talloc_fn(function,
|
return pull_string_talloc_fn(function,
|
||||||
line,
|
line,
|
||||||
ctx,
|
ctx,
|
||||||
inbuf,
|
base,
|
||||||
SVAL(inbuf, smb_flg2),
|
flags2,
|
||||||
pp_dest,
|
pp_dest,
|
||||||
src,
|
src,
|
||||||
src_len,
|
src_len,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user