svn commit: samba r25224 - in branches: SAMBA_3_2/source/rpc_client SAMBA_3_2_0/source/rpc_client

obnox at samba.org obnox at samba.org
Wed Sep 19 12:03:04 GMT 2007


Author: obnox
Date: 2007-09-19 12:03:02 +0000 (Wed, 19 Sep 2007)
New Revision: 25224

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25224

Log:
Fix a potential segfault in lsa_lookupsids client code due to
uninitialized data.

Michael


Modified:
   branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c
   branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c


Changeset:
Modified: branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c
===================================================================
--- branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c	2007-09-19 11:01:44 UTC (rev 25223)
+++ branches/SAMBA_3_2/source/rpc_client/cli_lsarpc.c	2007-09-19 12:03:02 UTC (rev 25224)
@@ -172,6 +172,7 @@
 			NT_STATUS_UNSUCCESSFUL );
 
 	if (!NT_STATUS_IS_OK(r.status) &&
+	    !NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) &&
 	    !NT_STATUS_EQUAL(r.status, STATUS_SOME_UNMAPPED)) 
 	{
 		/* An actual error occured */
@@ -181,7 +182,9 @@
 
 	/* Return output parameters */
 
-	if (r.mapped_count == 0) {
+	if (NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) ||
+	    (r.mapped_count == 0))
+	{
 		for (i = 0; i < num_sids; i++) {
 			(names)[i] = NULL;
 			(domains)[i] = NULL;

Modified: branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c
===================================================================
--- branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c	2007-09-19 11:01:44 UTC (rev 25223)
+++ branches/SAMBA_3_2_0/source/rpc_client/cli_lsarpc.c	2007-09-19 12:03:02 UTC (rev 25224)
@@ -172,6 +172,7 @@
 			NT_STATUS_UNSUCCESSFUL );
 
 	if (!NT_STATUS_IS_OK(r.status) &&
+	    !NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) &&
 	    !NT_STATUS_EQUAL(r.status, STATUS_SOME_UNMAPPED)) 
 	{
 		/* An actual error occured */
@@ -181,7 +182,9 @@
 
 	/* Return output parameters */
 
-	if (r.mapped_count == 0) {
+	if (NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) ||
+	    (r.mapped_count == 0))
+	{
 		for (i = 0; i < num_sids; i++) {
 			(names)[i] = NULL;
 			(domains)[i] = NULL;



More information about the samba-cvs mailing list