libcli/security: remove unused sec_ace_del_sid()
authorDavid Disseldorp <ddiss@samba.org>
Wed, 28 May 2014 15:11:20 +0000 (17:11 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 28 May 2014 23:08:25 +0000 (01:08 +0200)
With sec_desc_del_sid() now gone, this can also be removed.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/secace.c
libcli/security/secace.h

index 4e55110f0f9ea9aac845f22a49d8839e48d9e0dd..c2cbe906328b2c7854f593ca8afe3dc48d7d0d0c 100644 (file)
@@ -88,38 +88,6 @@ NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, const struct dom_
        return NT_STATUS_NOT_FOUND;
 }
 
-/*******************************************************************
- delete SID from ACL
-********************************************************************/
-
-NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct security_ace *old, uint32_t *num, const struct dom_sid *sid)
-{
-       unsigned int i     = 0;
-       unsigned int n_del = 0;
-
-       if (!ctx || !pp_new || !old || !sid || !num)  return NT_STATUS_INVALID_PARAMETER;
-
-       if (*num) {
-               if((pp_new[0] = talloc_zero_array(ctx, struct security_ace, *num )) == 0)
-                       return NT_STATUS_NO_MEMORY;
-       } else {
-               pp_new[0] = NULL;
-       }
-
-       for (i = 0; i < *num; i ++) {
-               if (!dom_sid_equal(&old[i].trustee, sid))
-                       sec_ace_copy(&(*pp_new)[i], &old[i]);
-               else
-                       n_del ++;
-       }
-       if (n_del == 0)
-               return NT_STATUS_NOT_FOUND;
-       else {
-               *num -= n_del;
-               return NT_STATUS_OK;
-       }
-}
-
 /*******************************************************************
  Compares two struct security_ace structures
 ********************************************************************/
index 4f8d358a7a22cd2a99dfc30842140b2fa2f9678e..43e6a916161d4e0d467086137de280a958ba02e5 100644 (file)
@@ -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);
-NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct security_ace *old, uint32_t *num, const struct dom_sid *sid);
 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);