From a37ddb8ae0fe52b4adea3c35bd4e6e85b909d83f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 15:03:37 +0100 Subject: ndr_sec_helper: create a completely zero sid, so that ndr_size_dom_sid28 can return 0 metze (This used to be commit ae6976eb4a8ddafc40ce91f68c9bca861502093b) --- source4/librpc/ndr/ndr_sec_helper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/librpc/ndr') 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; -- cgit