summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-06 14:04:15 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-06 17:18:13 +0200
commita1df729f7b498c770a013ddabb38d0b2e8608b67 (patch)
tree3a184467d37b9be693377884925e2b8206fd8fb3 /source3
parent2b0cc3c412d2cad5e35728f86cc66109f5dc4676 (diff)
downloadsamba-a1df729f7b498c770a013ddabb38d0b2e8608b67.tar.gz
samba-a1df729f7b498c770a013ddabb38d0b2e8608b67.tar.bz2
samba-a1df729f7b498c770a013ddabb38d0b2e8608b67.zip
s3:libsmb: let cli_qfileinfo[_recv]() return recv_flags2
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clifile.c14
-rw-r--r--source3/libsmb/clirap.c3
-rw-r--r--source3/libsmb/clirap.h3
-rw-r--r--source3/torture/torture.c2
4 files changed, 16 insertions, 6 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 88cecd505c..eab278f1c3 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -5059,6 +5059,7 @@ struct cli_qfileinfo_state {
uint16_t setup[1];
uint8_t param[4];
uint8_t *data;
+ uint16_t recv_flags2;
uint32_t min_rdata;
uint8_t *rdata;
uint32_t num_rdata;
@@ -5118,7 +5119,9 @@ static void cli_qfileinfo_done(struct tevent_req *subreq)
req, struct cli_qfileinfo_state);
NTSTATUS status;
- status = cli_trans_recv(subreq, state, NULL, NULL, 0, NULL,
+ status = cli_trans_recv(subreq, state,
+ &state->recv_flags2,
+ NULL, 0, NULL,
NULL, 0, NULL,
&state->rdata, state->min_rdata,
&state->num_rdata);
@@ -5129,6 +5132,7 @@ static void cli_qfileinfo_done(struct tevent_req *subreq)
}
NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ uint16_t *recv_flags2,
uint8_t **rdata, uint32_t *num_rdata)
{
struct cli_qfileinfo_state *state = tevent_req_data(
@@ -5138,6 +5142,10 @@ NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
if (tevent_req_is_nterror(req, &status)) {
return status;
}
+
+ if (recv_flags2 != NULL) {
+ *recv_flags2 = state->recv_flags2;
+ }
if (rdata != NULL) {
*rdata = talloc_move(mem_ctx, &state->rdata);
} else {
@@ -5151,7 +5159,7 @@ NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
uint16_t fnum, uint16_t level, uint32_t min_rdata,
- uint32_t max_rdata,
+ uint32_t max_rdata, uint16_t *recv_flags2,
uint8_t **rdata, uint32_t *num_rdata)
{
TALLOC_CTX *frame = talloc_stackframe();
@@ -5178,7 +5186,7 @@ NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
- status = cli_qfileinfo_recv(req, mem_ctx, rdata, num_rdata);
+ status = cli_qfileinfo_recv(req, mem_ctx, recv_flags2, rdata, num_rdata);
fail:
TALLOC_FREE(frame);
return status;
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index e5ff1abc18..731ddfb8c1 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -1073,7 +1073,7 @@ NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name,
status = cli_qfileinfo(talloc_tos(), cli, fnum,
SMB_QUERY_FILE_NAME_INFO,
- 4, cli->max_xmit,
+ 4, cli->max_xmit, NULL,
&rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -1110,6 +1110,7 @@ NTSTATUS cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
status = cli_qfileinfo(talloc_tos(), cli, fnum,
SMB_QUERY_FILE_ALL_INFO,
68, MIN(cli->max_xmit, 0xffff),
+ NULL,
&rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
return status;
diff --git a/source3/libsmb/clirap.h b/source3/libsmb/clirap.h
index 26265dec50..1716e17eec 100644
--- a/source3/libsmb/clirap.h
+++ b/source3/libsmb/clirap.h
@@ -130,10 +130,11 @@ struct tevent_req *cli_qfileinfo_send(TALLOC_CTX *mem_ctx,
uint16_t level, uint32_t min_rdata,
uint32_t max_rdata);
NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ uint16_t *recv_flags2,
uint8_t **rdata, uint32_t *num_rdata);
NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
uint16_t fnum, uint16_t level, uint32_t min_rdata,
- uint32_t max_rdata,
+ uint32_t max_rdata, uint16_t *recv_flags2,
uint8_t **rdata, uint32_t *num_rdata);
struct tevent_req *cli_flush_send(TALLOC_CTX *mem_ctx,
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index faa4326489..4c9ef97dfa 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -3246,7 +3246,7 @@ static NTSTATUS new_trans(struct cli_state *pcli, int fnum, int level)
NTSTATUS status;
status = cli_qfileinfo(talloc_tos(), pcli, fnum, level, 0,
- pcli->max_xmit, &buf, &len);
+ pcli->max_xmit, NULL, &buf, &len);
if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: qfileinfo (%d) failed (%s)\n", level,
nt_errstr(status));