summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-14 15:03:37 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-15 08:52:23 +0100
commita37ddb8ae0fe52b4adea3c35bd4e6e85b909d83f (patch)
tree28d9b780a1a6ddd8f0b24e59134006fd41efb52f
parentf9116ae6db3c10ede2ce55040bc79c7624064bc0 (diff)
downloadsamba-a37ddb8ae0fe52b4adea3c35bd4e6e85b909d83f.tar.gz
samba-a37ddb8ae0fe52b4adea3c35bd4e6e85b909d83f.tar.bz2
samba-a37ddb8ae0fe52b4adea3c35bd4e6e85b909d83f.zip
ndr_sec_helper: create a completely zero sid, so that ndr_size_dom_sid28 can return 0
metze (This used to be commit ae6976eb4a8ddafc40ce91f68c9bca861502093b)
-rw-r--r--source4/librpc/ndr/ndr_sec_helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr_sec_helper.c b/source4/librpc/ndr/ndr_sec_helper.c
index 30eaf9c6f4..5a0178bd25 100644
--- a/source4/librpc/ndr/ndr_sec_helper.c
+++ b/source4/librpc/ndr/ndr_sec_helper.c
@@ -187,6 +187,9 @@ enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct
if (!NDR_ERR_CODE_IS_SUCCESS(status)) {
/* handle a w2k bug which send random data in the buffer */
ZERO_STRUCTP(sid);
+ } else if (sid->num_auths == 0 && sid->sub_auths) {
+ talloc_free(sid->sub_auths);
+ sid->sub_auths = NULL;
}
return NDR_ERR_SUCCESS;