[PATCH 11/11] libcli/security: remove sec_ace_equal
David Disseldorp
ddiss at samba.org
Wed May 28 16:09:46 MDT 2014
This function is a duplicate of security_ace_equal(), and is no longer
used.
Signed-off-by: David Disseldorp <ddiss at samba.org>
---
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 c2cbe90..b7c9fc54 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 43e6a91..5416134 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);
--
1.8.4.5
More information about the samba-technical
mailing list