[PATCH 13/13] libcli/secdesc: remove dup_sec_desc()

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


With all callers converted to use security_descriptor_copy(), this
function can be removed.

Signed-off-by: David Disseldorp <ddiss at samba.org>
---
 libcli/security/secdesc.c | 16 ----------------
 libcli/security/secdesc.h |  5 -----
 2 files changed, 21 deletions(-)

diff --git a/libcli/security/secdesc.c b/libcli/security/secdesc.c
index 72ba2db..44897b5 100644
--- a/libcli/security/secdesc.c
+++ b/libcli/security/secdesc.c
@@ -242,22 +242,6 @@ error_exit:
 }
 
 /*******************************************************************
- Duplicate a struct security_descriptor structure.
-********************************************************************/
-
-struct security_descriptor *dup_sec_desc(TALLOC_CTX *ctx, const struct security_descriptor *src)
-{
-	size_t dummy;
-
-	if(src == NULL)
-		return NULL;
-
-	return make_sec_desc( ctx, src->revision, src->type,
-				src->owner_sid, src->group_sid, src->sacl,
-				src->dacl, &dummy);
-}
-
-/*******************************************************************
  Convert a secdesc into a byte stream
 ********************************************************************/
 NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
diff --git a/libcli/security/secdesc.h b/libcli/security/secdesc.h
index 9002f75..4cef9be 100644
--- a/libcli/security/secdesc.h
+++ b/libcli/security/secdesc.h
@@ -48,11 +48,6 @@ struct security_descriptor *make_sec_desc(TALLOC_CTX *ctx,
 			struct security_acl *sacl, struct security_acl *dacl, size_t *sd_size);
 
 /*******************************************************************
- Duplicate a struct security_descriptor structure.
-********************************************************************/
-struct security_descriptor *dup_sec_desc(TALLOC_CTX *ctx, const struct security_descriptor *src);
-
-/*******************************************************************
  Convert a secdesc into a byte stream
 ********************************************************************/
 NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
-- 
1.8.4.5



More information about the samba-technical mailing list