[PATCH 10/13] s3/rpc_server/lsa: replace dup_sec_desc() usage

David Disseldorp ddiss at samba.org
Mon May 26 09:30:00 MDT 2014


Use security_descriptor_copy() instead, which is also provided by
libcli.

Signed-off-by: David Disseldorp <ddiss at samba.org>
---
 source3/rpc_server/lsa/srv_lsa_nt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index f4dc4afd..68a2a2c 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -406,9 +406,9 @@ static NTSTATUS create_lsa_policy_handle(TALLOC_CTX *mem_ctx,
 
 	info->name = talloc_strdup(info, name);
 
-	if (sd) {
-		info->sd = dup_sec_desc(info, sd);
-		if (!info->sd) {
+	if (sd != NULL) {
+		info->sd = security_descriptor_copy(info, sd);
+		if (info->sd == NULL) {
 			talloc_free(info);
 			return NT_STATUS_NO_MEMORY;
 		}
-- 
1.8.4.5



More information about the samba-technical mailing list