svn commit: samba r4772 - in branches/SAMBA_4_0/source/librpc/ndr: .

tridge at samba.org tridge at samba.org
Sun Jan 16 03:44:08 GMT 2005


Author: tridge
Date: 2005-01-16 03:44:08 +0000 (Sun, 16 Jan 2005)
New Revision: 4772

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

Log:
fixed checking of the conformant size for dom_sid2

Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr_sec.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_sec.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_sec.c	2005-01-16 01:57:12 UTC (rev 4771)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_sec.c	2005-01-16 03:44:08 UTC (rev 4772)
@@ -35,7 +35,13 @@
 		return NT_STATUS_OK;
 	}
 	NDR_CHECK(ndr_pull_uint32(ndr, &num_auths));
-	return ndr_pull_dom_sid(ndr, ndr_flags, sid);
+	NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid));
+	if (sid->num_auths != num_auths) {
+		return ndr_pull_error(ndr, NDR_ERR_CONFORMANT_SIZE, 
+				      "Bad conformant size %u should be %u", 
+				      num_auths, sid->num_auths);
+	}
+	return NT_STATUS_OK;
 }
 
 /*



More information about the samba-cvs mailing list