summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-16 03:44:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:53 -0500
commit2a04cf92219aed3381e1c49699c1f6b485a190a8 (patch)
tree46b903d8c7e89d87465edbf4b24790a04355b5d6 /source4
parentf525d07202a067c2ee1bba5aa2821a003be97051 (diff)
downloadsamba-2a04cf92219aed3381e1c49699c1f6b485a190a8.tar.gz
samba-2a04cf92219aed3381e1c49699c1f6b485a190a8.tar.bz2
samba-2a04cf92219aed3381e1c49699c1f6b485a190a8.zip
r4772: fixed checking of the conformant size for dom_sid2
(This used to be commit 0d31523aaed7a8995970dc9933a6a9d9b8536ee0)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/ndr/ndr_sec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 798d3a7cf1..5adff6b0ce 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -35,7 +35,13 @@ NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *
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;
}
/*