libcli/security Remove unused sec_acl_equal()
[metze/samba/wip.git] / libcli / security / secacl.c
index 29afe460b16485a17b7796f4c04b60ca4b6b3ddd..9c04df81d1eacc5e286eaaa4bd146e6787f74536 100644 (file)
@@ -75,49 +75,3 @@ struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src)
 
        return make_sec_acl(ctx, src->revision, src->num_aces, src->aces);
 }
-
-/*******************************************************************
- Compares two SEC_ACL structures
-********************************************************************/
-
-bool sec_acl_equal(struct security_acl *s1, struct security_acl *s2)
-{
-       unsigned int i, j;
-
-       /* Trivial cases */
-
-       if (!s1 && !s2) return true;
-       if (!s1 || !s2) return false;
-
-       /* Check top level stuff */
-
-       if (s1->revision != s2->revision) {
-               DEBUG(10, ("sec_acl_equal(): revision differs (%d != %d)\n",
-                          s1->revision, s2->revision));
-               return false;
-       }
-
-       if (s1->num_aces != s2->num_aces) {
-               DEBUG(10, ("sec_acl_equal(): num_aces differs (%d != %d)\n",
-                          s1->revision, s2->revision));
-               return false;
-       }
-
-       /* The ACEs could be in any order so check each ACE in s1 against 
-          each ACE in s2. */
-
-       for (i = 0; i < s1->num_aces; i++) {
-               bool found = false;
-
-               for (j = 0; j < s2->num_aces; j++) {
-                       if (sec_ace_equal(&s1->aces[i], &s2->aces[j])) {
-                               found = true;
-                               break;
-                       }
-               }
-
-               if (!found) return false;
-       }
-
-       return true;
-}