[PATCH 04/11] libcli/security: remove unused sec_ace_del_sid()
David Disseldorp
ddiss at samba.org
Wed May 28 16:09:39 MDT 2014
With sec_desc_del_sid() now gone, this can also be removed.
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 4e55110..c2cbe90 100644
--- a/libcli/security/secace.c
+++ b/libcli/security/secace.c
@@ -89,38 +89,6 @@ NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, const struct dom_
}
/*******************************************************************
- 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
********************************************************************/
diff --git a/libcli/security/secace.h b/libcli/security/secace.h
index 4f8d358..43e6a91 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);
-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);
--
1.8.4.5
More information about the samba-technical
mailing list