svn commit: samba r2834 - branches/SAMBA_3_0/source/libsmb trunk/source/libsmb

tpot at samba.org tpot at samba.org
Thu Oct 7 03:55:39 GMT 2004


Author: tpot
Date: 2004-10-07 03:55:39 +0000 (Thu, 07 Oct 2004)
New Revision: 2834

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2834&nolog=1

Log:
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.

Modified:
   branches/SAMBA_3_0/source/libsmb/clisecdesc.c
   trunk/source/libsmb/clisecdesc.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clisecdesc.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/clisecdesc.c	2004-10-07 03:47:38 UTC (rev 2833)
+++ branches/SAMBA_3_0/source/libsmb/clisecdesc.c	2004-10-07 03:55:39 UTC (rev 2834)
@@ -53,6 +53,9 @@
 		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);

Modified: trunk/source/libsmb/clisecdesc.c
===================================================================
--- trunk/source/libsmb/clisecdesc.c	2004-10-07 03:47:38 UTC (rev 2833)
+++ trunk/source/libsmb/clisecdesc.c	2004-10-07 03:55:39 UTC (rev 2834)
@@ -53,6 +53,9 @@
 		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);



More information about the samba-cvs mailing list