From 66e689478a700d669a1abfcb272b4191aa528658 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 7 Oct 2004 03:55:39 +0000 Subject: 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) --- source3/libsmb/clisecdesc.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit