libcli/security: handle node initialisation in one spot in insert_in_object_tree()
commit5b4e3de2bb25eeb85d72a886386c853cea3e9468
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jan 2013 09:40:32 +0000 (3 20:40 +1100)
committerStefan Metzmacher <metze@samba.org>
Mon, 21 Jan 2013 15:12:45 +0000 (21 16:12 +0100)
treef8dae1c393f8f4f768584d67036e0b15a7ac0e94
parenta359aef0837781c42bf9dbcdd069796c72cc94c7
libcli/security: handle node initialisation in one spot in insert_in_object_tree()

This removes special-case for initalising the children array in
insert_in_object_tree().  talloc_realloc() handles the intial allocate
case perfectly well, so there is no need to have this duplicated.

This also restores having just one place were the rest of the elements
are intialised, to ensure uniform behaviour.

To do this, we have to rework insert_in_object_tree to have only one
output variable, both because having both root and new_node as output
variables was too confusing, and because otherwise the two pointers
were being allowed to point at the same memory.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/access_check.h
libcli/security/object_tree.c
source4/dsdb/common/dsdb_access.c
source4/dsdb/samdb/ldb_modules/acl_util.c