From c4fc0b49f05f56174dc904a19d9e4dfc6d3ef523 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 12 Dec 2008 19:52:06 +0100 Subject: Manually marshall dom_sid, so we can use a fixed size array for dom_sid.sub_auths rather than a dynamically allocated one. This makes it possible to use the same DCE/RPC object code for Samba 3 and Samba 4's DCE/RPC parsers and allows copying sids more easily (since they no longer contain any pointers). The cost of having additional manual marshalling code is limited (~35 additional lines of C code). --- source4/torture/unix/whoami.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/torture/unix/whoami.c') diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c index 5e5a5e81cd..b72b9fcb09 100644 --- a/source4/torture/unix/whoami.c +++ b/source4/torture/unix/whoami.c @@ -127,11 +127,6 @@ static bool sid_parse(void *mem_ctx, torture_assert(torture, (*psid)->num_auths <= 15, "invalid sub_auth value"); - (*psid)->sub_auths = talloc_array(mem_ctx, uint32_t, - (*psid)->num_auths); - torture_assert(torture, (*psid)->sub_auths != NULL, - "out of memory"); - for (i = 0; i < (*psid)->num_auths; i++) { (*psid)->sub_auths[i] = IVAL(data->data, *offset); (*offset) += 4; -- cgit