diff options
author | David Disseldorp <ddiss@samba.org> | 2014-05-28 16:48:59 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-05-29 01:08:25 +0200 |
commit | 8a2599a3490bc21187ca19a1069459becb6f7e91 (patch) | |
tree | de80174e16bbb03e0af02fc25e597c6848ad8133 | |
parent | f0bc0ac893448905d57810d72d95a62fd35b7f1b (diff) | |
download | samba-8a2599a3490bc21187ca19a1069459becb6f7e91.tar.gz samba-8a2599a3490bc21187ca19a1069459becb6f7e91.tar.xz samba-8a2599a3490bc21187ca19a1069459becb6f7e91.zip |
libcli/security: remove unused sec_desc_del_sid()
The function is unused, and shares mostly the same behaviour as
security_descriptor_acl_del().
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | libcli/security/secdesc.c | 33 | ||||
-rw-r--r-- | libcli/security/secdesc.h | 4 |
2 files changed, 0 insertions, 37 deletions
diff --git a/libcli/security/secdesc.c b/libcli/security/secdesc.c index a3657ddfe5..ff14d18b34 100644 --- a/libcli/security/secdesc.c +++ b/libcli/security/secdesc.c @@ -411,39 +411,6 @@ NTSTATUS sec_desc_mod_sid(struct security_descriptor *sd, struct dom_sid *sid, u return NT_STATUS_OK; } -/******************************************************************* - Delete a SID from a struct security_descriptor. -********************************************************************/ - -NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, struct security_descriptor **psd, struct dom_sid *sid, size_t *sd_size) -{ - struct security_descriptor *sd = 0; - struct security_acl *dacl = 0; - struct security_ace *ace = 0; - NTSTATUS status; - - if (!ctx || !psd[0] || !sid || !sd_size) - return NT_STATUS_INVALID_PARAMETER; - - *sd_size = 0; - - status = sec_ace_del_sid(ctx, &ace, psd[0]->dacl->aces, &psd[0]->dacl->num_aces, sid); - - if (!NT_STATUS_IS_OK(status)) - return status; - - if (!(dacl = make_sec_acl(ctx, psd[0]->dacl->revision, psd[0]->dacl->num_aces, ace))) - return NT_STATUS_UNSUCCESSFUL; - - if (!(sd = make_sec_desc(ctx, psd[0]->revision, psd[0]->type, psd[0]->owner_sid, - psd[0]->group_sid, psd[0]->sacl, dacl, sd_size))) - return NT_STATUS_UNSUCCESSFUL; - - *psd = sd; - sd = 0; - return NT_STATUS_OK; -} - /* * Determine if an struct security_ace is inheritable */ diff --git a/libcli/security/secdesc.h b/libcli/security/secdesc.h index 4cef9be56e..4c96ccde55 100644 --- a/libcli/security/secdesc.h +++ b/libcli/security/secdesc.h @@ -94,10 +94,6 @@ struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src) ********************************************************************/ NTSTATUS sec_desc_mod_sid(struct security_descriptor *sd, struct dom_sid *sid, uint32_t mask); -/******************************************************************* - Delete a SID from a struct security_descriptor. -********************************************************************/ -NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, struct security_descriptor **psd, struct dom_sid *sid, size_t *sd_size); 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, |