diff options
author | Tim Potter <tpot@samba.org> | 2004-10-07 03:55:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:54 -0500 |
commit | 66e689478a700d669a1abfcb272b4191aa528658 (patch) | |
tree | 6a2ae35bc41843bffa1ac4ee2fda3c8648dd952c | |
parent | 132879b285e66bff896c761858311d7f5d43e9b6 (diff) | |
download | samba-66e689478a700d669a1abfcb272b4191aa528658.tar.gz samba-66e689478a700d669a1abfcb272b4191aa528658.tar.bz2 samba-66e689478a700d669a1abfcb272b4191aa528658.zip |
r2834: Netapps can return NT_STATUS_ACCESS_DENIED when trying to return the
security descriptor for a file. Return an error in this case instead
of panicing trying to unpack a zero length buffer. Found by Brett
Funderburg.
(This used to be commit 588de0d4a84a5228d0f99f743ad327ad3b70ead1)
-rw-r--r-- | source3/libsmb/clisecdesc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libsmb/clisecdesc.c b/source3/libsmb/clisecdesc.c index 2989966f4d..b79ea9d14b 100644 --- a/source3/libsmb/clisecdesc.c +++ b/source3/libsmb/clisecdesc.c @@ -53,6 +53,9 @@ SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, goto cleanup; } + if (cli_is_error(cli)) + goto cleanup; + prs_init(&pd, rdata_count, mem_ctx, UNMARSHALL); prs_copy_data_in(&pd, rdata, rdata_count); prs_set_offset(&pd,0); |