From 96c7e9b08dc5701abd1416ba1050ae3cc44f6558 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 28 May 2014 17:50:52 +0200 Subject: [PATCH] libcli/security: remove sec_ace_equal This function is a duplicate of security_ace_equal(), and is no longer used. Signed-off-by: David Disseldorp Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Thu May 29 03:34:38 CEST 2014 on sn-devel-104 --- libcli/security/secace.c | 32 -------------------------------- libcli/security/secace.h | 1 - 2 files changed, 33 deletions(-) diff --git a/libcli/security/secace.c b/libcli/security/secace.c index c2cbe906328..b7c9fc54d1e 100644 --- a/libcli/security/secace.c +++ b/libcli/security/secace.c @@ -88,38 +88,6 @@ NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, const struct dom_ return NT_STATUS_NOT_FOUND; } -/******************************************************************* - Compares two struct security_ace structures -********************************************************************/ - -bool sec_ace_equal(const struct security_ace *s1, const struct security_ace *s2) -{ - /* Trivial case */ - - if (!s1 && !s2) { - return true; - } - - if (!s1 || !s2) { - return false; - } - - /* Check top level stuff */ - - if (s1->type != s2->type || s1->flags != s2->flags || - s1->access_mask != s2->access_mask) { - return false; - } - - /* Check SID */ - - if (!dom_sid_equal(&s1->trustee, &s2->trustee)) { - return false; - } - - return true; -} - int nt_ace_inherit_comp(const struct security_ace *a1, const struct security_ace *a2) { int a1_inh = a1->flags & SEC_ACE_FLAG_INHERITED_ACE; diff --git a/libcli/security/secace.h b/libcli/security/secace.h index 43e6a916161..5416134dd64 100644 --- a/libcli/security/secace.h +++ b/libcli/security/secace.h @@ -28,7 +28,6 @@ void sec_ace_copy(struct security_ace *ace_dest, const struct security_ace *ace_ void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum security_ace_type type, uint32_t mask, uint8_t flag); NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, const struct dom_sid *sid, uint32_t mask); -bool sec_ace_equal(const struct security_ace *s1, const struct security_ace *s2); int nt_ace_inherit_comp( const struct security_ace *a1, const struct security_ace *a2); int nt_ace_canon_comp( const struct security_ace *a1, const struct security_ace *a2); void dacl_sort_into_canonical_order(struct security_ace *srclist, unsigned int num_aces); -- 2.11.4.GIT