diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-14 11:12:50 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-14 12:20:12 +0100 |
commit | f4cf1c56a20916018c9a6513754b0b08c24c9d04 (patch) | |
tree | 959d0658b45497e77b0a3b9071f5c8761dff5e51 /source3/libsmb/clisecdesc.c | |
parent | 4a777ec4d709d2fce2378b7b4d740aa73c32e73b (diff) | |
download | samba-f4cf1c56a20916018c9a6513754b0b08c24c9d04.tar.gz samba-f4cf1c56a20916018c9a6513754b0b08c24c9d04.tar.bz2 samba-f4cf1c56a20916018c9a6513754b0b08c24c9d04.zip |
s3: Add min_setup, min_param and min_data to cli_trans_recv
Every caller that expects to receive something needs to check if enough was
sent. Make this check mandatory for everyone.
Yes, this makes the parameter list for cli_trans a bit silly, but that's just
the way it is: A silly protocol request :-)
While there, convert some _done functions to tevent_req_simple_finish_ntstatus.
Diffstat (limited to 'source3/libsmb/clisecdesc.c')
-rw-r--r-- | source3/libsmb/clisecdesc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/libsmb/clisecdesc.c b/source3/libsmb/clisecdesc.c index 1c87eabafe..f4f7c545e1 100644 --- a/source3/libsmb/clisecdesc.c +++ b/source3/libsmb/clisecdesc.c @@ -26,8 +26,8 @@ SEC_DESC *cli_query_secdesc(struct cli_state *cli, uint16_t fnum, TALLOC_CTX *mem_ctx) { uint8_t param[8]; - uint8_t *rparam=NULL, *rdata=NULL; - unsigned int rparam_count=0, rdata_count=0; + uint8_t *rdata=NULL; + uint32_t rdata_count=0; SEC_DESC *psd = NULL; NTSTATUS status; @@ -40,9 +40,9 @@ SEC_DESC *cli_query_secdesc(struct cli_state *cli, uint16_t fnum, NULL, 0, 0, /* setup, length, max */ param, 8, 4, /* param, length, max */ NULL, 0, 0x10000, /* data, length, max */ - NULL, NULL, /* rsetup, length */ - &rparam, &rparam_count, - &rdata, &rdata_count); + NULL, 0, NULL, /* rsetup, length */ + NULL, 0, NULL, + &rdata, 0, &rdata_count); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("NT_TRANSACT_QUERY_SECURITY_DESC failed: %s\n", @@ -61,7 +61,6 @@ SEC_DESC *cli_query_secdesc(struct cli_state *cli, uint16_t fnum, cleanup: - TALLOC_FREE(rparam); TALLOC_FREE(rdata); return psd; |