summaryrefslogtreecommitdiff
path: root/libgpo
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2014-05-26 15:48:34 +0200
committerJeremy Allison <jra@samba.org>2014-05-28 17:52:13 +0200
commitb7caabdb9e21974159e8a99e9741fafd8e7bdf2d (patch)
treebd883055afce89da8a18ef827fc7a3bee8a4a9d7 /libgpo
parentb82d43658654fcfb65111b425f563b7a57ca91af (diff)
downloadsamba-b7caabdb9e21974159e8a99e9741fafd8e7bdf2d.tar.gz
libgpo: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libgpo')
-rw-r--r--libgpo/gpo_util.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c
index 5b801c4b086..e90b9a3f244 100644
--- a/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -773,7 +773,13 @@ NTSTATUS gpo_copy(TALLOC_CTX *mem_ctx,
}
}
- gpo->security_descriptor = dup_sec_desc(gpo, gpo_src->security_descriptor);
+ if (gpo_src->security_descriptor == NULL) {
+ /* existing SD assumed */
+ TALLOC_FREE(gpo);
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ gpo->security_descriptor = security_descriptor_copy(gpo,
+ gpo_src->security_descriptor);
if (gpo->security_descriptor == NULL) {
TALLOC_FREE(gpo);
return NT_STATUS_NO_MEMORY;