From 3e197d4370b03f6a8d711f5b61c6525bd75aa304 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 21 May 2019 15:03:06 +1200 Subject: [PATCH] libcli/security: Remove unused dup_sec_desc_buf() This has been unused since before 762e7e1dff89cc14b0130fc9a22038b0845630a2 in 2003. Found by callcatcher Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- libcli/security/secdesc.c | 12 ------------ libcli/security/secdesc.h | 5 ----- 2 files changed, 17 deletions(-) diff --git a/libcli/security/secdesc.c b/libcli/security/secdesc.c index 53e0e023a7b..cd944306ee1 100644 --- a/libcli/security/secdesc.c +++ b/libcli/security/secdesc.c @@ -384,18 +384,6 @@ struct sec_desc_buf *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, struct secur return dst; } -/******************************************************************* - Duplicates a struct sec_desc_buf structure. -********************************************************************/ - -struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src) -{ - if(src == NULL) - return NULL; - - return make_sec_desc_buf( ctx, src->sd_size, src->sd); -} - /* * Determine if an struct security_ace is inheritable */ diff --git a/libcli/security/secdesc.h b/libcli/security/secdesc.h index dd8cf4ed716..ca9376a372e 100644 --- a/libcli/security/secdesc.h +++ b/libcli/security/secdesc.h @@ -84,11 +84,6 @@ struct security_descriptor *make_standard_sec_desc(TALLOC_CTX *ctx, const struct ********************************************************************/ struct sec_desc_buf *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, struct security_descriptor *sec_desc); -/******************************************************************* - Duplicates a struct sec_desc_buf structure. -********************************************************************/ -struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src); - bool sd_has_inheritable_components(const struct security_descriptor *parent_ctr, bool container); NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx, struct security_descriptor **ppsd,