From: David Disseldorp Date: Mon, 26 May 2014 13:48:34 +0000 (+0200) Subject: libgpo: replace dup_sec_desc() usage X-Git-Tag: tdb-1.3.1~1180 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=b7caabdb9e21974159e8a99e9741fafd8e7bdf2d libgpo: replace dup_sec_desc() usage Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp Reviewed-by: Jeremy Allison --- 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;