[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed May 28 19:35:04 MDT 2014


The branch, master has been updated
       via  96c7e9b libcli/security: remove sec_ace_equal
       via  7226a89 secdesc: use security_ace_equal instead of sec_ace_equal
       via  d9776c6 torture/attr: use security_ace_equal instead of sec_ace_equal
       via  bc70d58 s3/smbcacls: use security_ace_equal instead of sec_ace_equal
       via  124775c s3/sharesec: use security_ace_equal instead of sec_ace_equal
       via  3e1a477 s3/libsmb_xattr: use security_ace_equal instead of sec_ace_equal
       via  4de94ad libcli/security: cleanup security_ace_equal()
       via  f1a96f8 libcli/security: remove unused sec_ace_del_sid()
       via  8a2599a libcli/security: remove unused sec_desc_del_sid()
       via  f0bc0ac libcli/security: remove dup_sec_acl()
       via  256aa9b libcli/security: clean up and fix make_sec_desc
      from  8605564 s3/profiles: improve copy_registry_tree() errors

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 96c7e9b08dc5701abd1416ba1050ae3cc44f6558
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:50:52 2014 +0200

    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 <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu May 29 03:34:38 CEST 2014 on sn-devel-104

commit 7226a8920df377a2fabf606b30a86ceeb385c150
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:44:43 2014 +0200

    secdesc: use security_ace_equal instead of sec_ace_equal
    
    Both offer the same functionality, sec_ace_equal() will be removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit d9776c65e361b631a19ce32efe58a55df50a9467
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:44:43 2014 +0200

    torture/attr: use security_ace_equal instead of sec_ace_equal
    
    Both offer the same functionality, sec_ace_equal() will be removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit bc70d58cbc1243bb8731ffff5d08848d75f074e4
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:44:43 2014 +0200

    s3/smbcacls: use security_ace_equal instead of sec_ace_equal
    
    Both offer the same functionality, sec_ace_equal() will be removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 124775ca812be463ecaf7c573ee6a1d5bdd90559
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:44:08 2014 +0200

    s3/sharesec: use security_ace_equal instead of sec_ace_equal
    
    Both offer the same functionality, sec_ace_equal() will be removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 3e1a477fdac2d56b01b5cf5f9c868f31e43802a8
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:42:08 2014 +0200

    s3/libsmb_xattr: use security_ace_equal instead of sec_ace_equal
    
    Both offer the same functionality, sec_ace_equal() will be removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 4de94ad8fd601c6871fa0dd2d51864f77c80b26e
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:13:32 2014 +0200

    libcli/security: cleanup security_ace_equal()
    
    This change cleans up the white-space damage, and converts the single
    line if-then statements to match Samba's coding conventions.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit f1a96f8582d90025f65ddeeb24f1095e1781454d
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 17:11:20 2014 +0200

    libcli/security: remove unused sec_ace_del_sid()
    
    With sec_desc_del_sid() now gone, this can also be removed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 8a2599a3490bc21187ca19a1069459becb6f7e91
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 16:48:59 2014 +0200

    libcli/security: remove unused sec_desc_del_sid()
    
    The function is unused, and shares mostly the same behaviour as
    security_descriptor_acl_del().
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit f0bc0ac893448905d57810d72d95a62fd35b7f1b
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 15:43:34 2014 +0200

    libcli/security: remove dup_sec_acl()
    
    With make_sec_desc() converted to use security_acl_dup(), which offers
    the same behaviour, this function is no longer needed.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 256aa9b20bbc5f0005677981ab545edf7d52edd6
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed May 28 15:25:29 2014 +0200

    libcli/security: clean up and fix make_sec_desc
    
    It currently leaks memory onto the provided talloc context on error, fix
    this.
    
    Use X_acl_dup() functions provided by secuity_descriptor.c, rather than
    the redundant secdesc.c calls. Also, use the IDL generated functions to
    calculate the security descriptor structure size.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 libcli/security/secace.c              |   64 -------------------
 libcli/security/secace.h              |    2 -
 libcli/security/secacl.c              |   12 ----
 libcli/security/secacl.h              |    1 -
 libcli/security/secdesc.c             |  112 +++++++++------------------------
 libcli/security/secdesc.h             |    4 -
 libcli/security/security_descriptor.c |   28 ++++++---
 source3/libsmb/libsmb_xattr.c         |    9 ++-
 source3/utils/sharesec.c              |    8 ++-
 source3/utils/smbcacls.c              |    9 ++-
 source4/torture/basic/attr.c          |    6 +-
 11 files changed, 68 insertions(+), 187 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/secace.c b/libcli/security/secace.c
index 4e55110..b7c9fc5 100644
--- a/libcli/security/secace.c
+++ b/libcli/security/secace.c
@@ -88,70 +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
-********************************************************************/
-
-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 4f8d358..5416134 100644
--- a/libcli/security/secace.h
+++ b/libcli/security/secace.h
@@ -28,8 +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);
 void dacl_sort_into_canonical_order(struct security_ace *srclist, unsigned int num_aces);
diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c
index 8d2ae10..b90e3ae 100644
--- a/libcli/security/secacl.c
+++ b/libcli/security/secacl.c
@@ -71,15 +71,3 @@ struct security_acl *make_sec_acl(TALLOC_CTX *ctx,
 
 	return dst;
 }
-
-/*******************************************************************
- Duplicate a SEC_ACL structure.
-********************************************************************/
-
-struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src)
-{
-	if(src == NULL)
-		return NULL;
-
-	return make_sec_acl(ctx, src->revision, src->num_aces, src->aces);
-}
diff --git a/libcli/security/secacl.h b/libcli/security/secacl.h
index 90fafe9..c58d2c4 100644
--- a/libcli/security/secacl.h
+++ b/libcli/security/secacl.h
@@ -25,7 +25,6 @@
 
 struct security_acl *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision,
 		      int num_aces, struct security_ace *ace_list);
-struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src);
 
 
 #endif /*_SECACL_H_*/
diff --git a/libcli/security/secdesc.c b/libcli/security/secdesc.c
index 44897b5..052bafb 100644
--- a/libcli/security/secdesc.c
+++ b/libcli/security/secdesc.c
@@ -161,9 +161,6 @@ struct security_descriptor *sec_desc_merge(TALLOC_CTX *ctx, struct security_desc
 /*******************************************************************
  Creates a struct security_descriptor structure
 ********************************************************************/
-
-#define  SEC_DESC_HEADER_SIZE (2 * sizeof(uint16_t) + 4 * sizeof(uint32_t))
-
 struct security_descriptor *make_sec_desc(TALLOC_CTX *ctx,
 			enum security_descriptor_revision revision,
 			uint16_t type,
@@ -171,73 +168,57 @@ struct security_descriptor *make_sec_desc(TALLOC_CTX *ctx,
 			struct security_acl *sacl, struct security_acl *dacl, size_t *sd_size)
 {
 	struct security_descriptor *dst;
-	uint32_t offset     = 0;
 
 	if (sd_size != NULL) {
 		*sd_size = 0;
 	}
 
-	if(( dst = talloc_zero(ctx, struct security_descriptor)) == NULL)
+	dst = security_descriptor_initialise(ctx);
+	if (dst == NULL) {
 		return NULL;
+	}
 
 	dst->revision = revision;
 	dst->type = type;
 
-	if (sacl)
+	if (sacl != NULL) {
+		dst->sacl = security_acl_dup(dst, sacl);
+		if (dst->sacl == NULL) {
+			goto err_sd_free;
+		}
 		dst->type |= SEC_DESC_SACL_PRESENT;
-	if (dacl)
-		dst->type |= SEC_DESC_DACL_PRESENT;
-
-	dst->owner_sid = NULL;
-	dst->group_sid   = NULL;
-	dst->sacl      = NULL;
-	dst->dacl      = NULL;
-
-	if(owner_sid && ((dst->owner_sid = dom_sid_dup(dst,owner_sid)) == NULL))
-		goto error_exit;
-
-	if(grp_sid && ((dst->group_sid = dom_sid_dup(dst,grp_sid)) == NULL))
-		goto error_exit;
-
-	if(sacl && ((dst->sacl = dup_sec_acl(dst, sacl)) == NULL))
-		goto error_exit;
-
-	if(dacl && ((dst->dacl = dup_sec_acl(dst, dacl)) == NULL))
-		goto error_exit;
-
-	if (sd_size == NULL) {
-		return dst;
 	}
 
-	offset = SEC_DESC_HEADER_SIZE;
-
-	/*
-	 * Work out the linearization sizes.
-	 */
-
-	if (dst->sacl != NULL) {
-		offset += dst->sacl->size;
+	if (dacl != NULL) {
+		dst->dacl = security_acl_dup(dst, dacl);
+		if (dst->dacl == NULL) {
+			goto err_sd_free;
+		}
+		dst->type |= SEC_DESC_DACL_PRESENT;
 	}
-	if (dst->dacl != NULL) {
-		offset += dst->dacl->size;
+
+	if (owner_sid != NULL) {
+		dst->owner_sid = dom_sid_dup(dst, owner_sid);
+		if (dst->owner_sid == NULL) {
+			goto err_sd_free;
+		}
 	}
 
-	if (dst->owner_sid != NULL) {
-		offset += ndr_size_dom_sid(dst->owner_sid, 0);
+	if (grp_sid != NULL) {
+		dst->group_sid = dom_sid_dup(dst, grp_sid);
+		if (dst->group_sid == NULL) {
+			goto err_sd_free;
+		}
 	}
 
-	if (dst->group_sid != NULL) {
-		offset += ndr_size_dom_sid(dst->group_sid, 0);
+	if (sd_size != NULL) {
+		*sd_size = ndr_size_security_descriptor(dst, 0);
 	}
 
-	*sd_size = (size_t)offset;
 	return dst;
 
-error_exit:
-
-	if (sd_size != NULL) {
-		*sd_size = 0;
-	}
+err_sd_free:
+	talloc_free(dst);
 	return NULL;
 }
 
@@ -430,39 +411,6 @@ NTSTATUS sec_desc_mod_sid(struct security_descriptor *sd, struct dom_sid *sid, u
 	return NT_STATUS_OK;
 }
 
-/*******************************************************************
- Delete a SID from a struct security_descriptor.
-********************************************************************/
-
-NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, struct security_descriptor **psd, struct dom_sid *sid, size_t *sd_size)
-{
-	struct security_descriptor *sd   = 0;
-	struct security_acl  *dacl = 0;
-	struct security_ace  *ace  = 0;
-	NTSTATUS  status;
-
-	if (!ctx || !psd[0] || !sid || !sd_size)
-		return NT_STATUS_INVALID_PARAMETER;
-
-	*sd_size = 0;
-
-	status = sec_ace_del_sid(ctx, &ace, psd[0]->dacl->aces, &psd[0]->dacl->num_aces, sid);
-
-	if (!NT_STATUS_IS_OK(status))
-		return status;
-
-	if (!(dacl = make_sec_acl(ctx, psd[0]->dacl->revision, psd[0]->dacl->num_aces, ace)))
-		return NT_STATUS_UNSUCCESSFUL;
-
-	if (!(sd = make_sec_desc(ctx, psd[0]->revision, psd[0]->type, psd[0]->owner_sid,
-		psd[0]->group_sid, psd[0]->sacl, dacl, sd_size)))
-		return NT_STATUS_UNSUCCESSFUL;
-
-	*psd = sd;
-	 sd  = 0;
-	return NT_STATUS_OK;
-}
-
 /*
  * Determine if an struct security_ace is inheritable
  */
@@ -654,7 +602,7 @@ NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
 		for (j=0; j < i; j++) {
 			struct security_ace *aj = &new_ace_list[j];
 
-			if (!sec_ace_equal(ai, aj)) {
+			if (!security_ace_equal(ai, aj)) {
 				continue;
 			}
 
diff --git a/libcli/security/secdesc.h b/libcli/security/secdesc.h
index 4cef9be..4c96ccd 100644
--- a/libcli/security/secdesc.h
+++ b/libcli/security/secdesc.h
@@ -94,10 +94,6 @@ struct sec_desc_buf *dup_sec_desc_buf(TALLOC_CTX *ctx, struct sec_desc_buf *src)
 ********************************************************************/
 NTSTATUS sec_desc_mod_sid(struct security_descriptor *sd, struct dom_sid *sid, uint32_t mask);
 
-/*******************************************************************
- Delete a SID from a struct security_descriptor.
-********************************************************************/
-NTSTATUS sec_desc_del_sid(TALLOC_CTX *ctx, struct security_descriptor **psd, struct dom_sid *sid, size_t *sd_size);
 bool sd_has_inheritable_components(const struct security_descriptor *parent_ctr, bool container);
 NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
 					struct security_descriptor **ppsd,
diff --git a/libcli/security/security_descriptor.c b/libcli/security/security_descriptor.c
index 25b316c..8304b20 100644
--- a/libcli/security/security_descriptor.c
+++ b/libcli/security/security_descriptor.c
@@ -344,17 +344,29 @@ NTSTATUS security_descriptor_sacl_del(struct security_descriptor *sd,
 /*
   compare two security ace structures
 */
-bool security_ace_equal(const struct security_ace *ace1, 
+bool security_ace_equal(const struct security_ace *ace1,
 			const struct security_ace *ace2)
 {
-	if (ace1 == ace2) return true;
-	if (!ace1 || !ace2) return false;
-	if (ace1->type != ace2->type) return false;
-	if (ace1->flags != ace2->flags) return false;
-	if (ace1->access_mask != ace2->access_mask) return false;
-	if (!dom_sid_equal(&ace1->trustee, &ace2->trustee)) return false;
+	if (ace1 == ace2) {
+		return true;
+	}
+	if ((ace1 == NULL) || (ace2 == NULL)) {
+		return false;
+	}
+	if (ace1->type != ace2->type) {
+		return false;
+	}
+	if (ace1->flags != ace2->flags) {
+		return false;
+	}
+	if (ace1->access_mask != ace2->access_mask) {
+		return false;
+	}
+	if (!dom_sid_equal(&ace1->trustee, &ace2->trustee)) {
+		return false;
+	}
 
-	return true;	
+	return true;
 }
 
 
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 8e6590a..8493776 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -64,7 +64,7 @@ ace_compare(struct security_ace *ace1,
         bool b2;
 
         /* If the ACEs are equal, we have nothing more to do. */
-        if (sec_ace_equal(ace1, ace2)) {
+        if (security_ace_equal(ace1, ace2)) {
 		return 0;
         }
 
@@ -152,7 +152,8 @@ sort_acl(struct security_acl *the_acl)
 	TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
 
 	for (i=1;i<the_acl->num_aces;) {
-		if (sec_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) {
+		if (security_ace_equal(&the_acl->aces[i-1],
+				       &the_acl->aces[i])) {
 			int j;
 			for (j=i; j<the_acl->num_aces-1; j++) {
 				the_acl->aces[j] = the_acl->aces[j+1];
@@ -1592,8 +1593,8 @@ cacl_set(SMBCCTX *context,
 			bool found = False;
 
 			for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
-                                if (sec_ace_equal(&sd->dacl->aces[i],
-                                                  &old->dacl->aces[j])) {
+                                if (security_ace_equal(&sd->dacl->aces[i],
+						       &old->dacl->aces[j])) {
 					uint32 k;
 					for (k=j; k<old->dacl->num_aces-1;k++) {
 						old->dacl->aces[k] =
diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c
index 67e3991..f6e71d7 100644
--- a/source3/utils/sharesec.c
+++ b/source3/utils/sharesec.c
@@ -285,7 +285,7 @@ static bool add_ace(TALLOC_CTX *mem_ctx, struct security_acl **the_acl, struct s
 
 static int ace_compare(struct security_ace *ace1, struct security_ace *ace2)
 {
-	if (sec_ace_equal(ace1, ace2))
+	if (security_ace_equal(ace1, ace2))
 		return 0;
 
 	if (ace1->type != ace2->type)
@@ -314,7 +314,8 @@ static void sort_acl(struct security_acl *the_acl)
 	TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
 
 	for (i=1;i<the_acl->num_aces;) {
-		if (sec_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) {
+		if (security_ace_equal(&the_acl->aces[i-1],
+				       &the_acl->aces[i])) {
 			int j;
 			for (j=i; j<the_acl->num_aces-1; j++) {
 				the_acl->aces[j] = the_acl->aces[j+1];
@@ -365,7 +366,8 @@ static int change_share_sec(TALLOC_CTX *mem_ctx, const char *sharename, char *th
 		bool found = False;
 
 		for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
-		    if (sec_ace_equal(&sd->dacl->aces[i], &old->dacl->aces[j])) {
+		    if (security_ace_equal(&sd->dacl->aces[i],
+					   &old->dacl->aces[j])) {
 			uint32 k;
 			for (k=j; k<old->dacl->num_aces-1;k++) {
 			    old->dacl->aces[k] = old->dacl->aces[k+1];
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 684fe79..47d75fe 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -1013,7 +1013,7 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode,
 
 static int ace_compare(struct security_ace *ace1, struct security_ace *ace2)
 {
-	if (sec_ace_equal(ace1, ace2))
+	if (security_ace_equal(ace1, ace2))
 		return 0;
 
 	if ((ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
@@ -1052,7 +1052,8 @@ static void sort_acl(struct security_acl *the_acl)
 	TYPESAFE_QSORT(the_acl->aces, the_acl->num_aces, ace_compare);
 
 	for (i=1;i<the_acl->num_aces;) {
-		if (sec_ace_equal(&the_acl->aces[i-1], &the_acl->aces[i])) {
+		if (security_ace_equal(&the_acl->aces[i-1],
+				       &the_acl->aces[i])) {
 			int j;
 			for (j=i; j<the_acl->num_aces-1; j++) {
 				the_acl->aces[j] = the_acl->aces[j+1];
@@ -1098,8 +1099,8 @@ static int cacl_set(struct cli_state *cli, const char *filename,
 			bool found = False;
 
 			for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
-				if (sec_ace_equal(&sd->dacl->aces[i],
-						  &old->dacl->aces[j])) {
+				if (security_ace_equal(&sd->dacl->aces[i],
+						       &old->dacl->aces[j])) {
 					uint32 k;
 					for (k=j; k<old->dacl->num_aces-1;k++) {
 						old->dacl->aces[k] = old->dacl->aces[k+1];
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index 2f0248e..8d51fa3 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -23,7 +23,7 @@
 #include "libcli/libcli.h"
 #include "torture/util.h"
 #include "system/filesys.h"
-#include "libcli/security/secace.h"
+#include "libcli/security/security_descriptor.h"
 #include "torture/basic/proto.h"
 
 extern int torture_failures;
@@ -295,7 +295,7 @@ bool torture_winattrtest(struct torture_context *tctx,
 			struct security_ace *ace1 = &sd1->dacl->aces[aceno];
 			struct security_ace *ace2 = &sd2->dacl->aces[aceno];
 
-			if(!sec_ace_equal(ace1,ace2)){
+			if (!security_ace_equal(ace1, ace2)) {
 				torture_comment(tctx,
 					"ACLs changed! Not expected!\n");
 				CHECK_MAX_FAILURES(error_exit_file);
@@ -414,7 +414,7 @@ error_exit_file:
 			struct security_ace *ace1 = &sd1->dacl->aces[aceno];
 			struct security_ace *ace2 = &sd2->dacl->aces[aceno];
 
-			if(!sec_ace_equal(ace1,ace2)){
+			if (!security_ace_equal(ace1, ace2)) {
 				torture_comment(tctx,
 					"ACLs changed! Not expected!\n");
 				CHECK_MAX_FAILURES(error_exit_dir);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list