summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-04-21 18:15:59 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-04-21 18:17:40 +0200
commitf4195183a47b0e7c8bc9644d62b123f7880f3fcd (patch)
tree9a3e55d10cd94a1cbb4014b78192a7d3f43f768a /source3/lib
parent14bbed1d6703764e6a58f335f142490895e5c768 (diff)
downloadsamba-f4195183a47b0e7c8bc9644d62b123f7880f3fcd.tar.gz
samba-f4195183a47b0e7c8bc9644d62b123f7880f3fcd.tar.bz2
samba-f4195183a47b0e7c8bc9644d62b123f7880f3fcd.zip
s3: Use common security_descriptor_equal().
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/secdesc.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/source3/lib/secdesc.c b/source3/lib/secdesc.c
index a81c4ae82a..5e35181834 100644
--- a/source3/lib/secdesc.c
+++ b/source3/lib/secdesc.c
@@ -32,74 +32,6 @@ const struct generic_mapping file_generic_mapping = {
};
/*******************************************************************
- Compares two SEC_DESC structures
-********************************************************************/
-
-bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
-{
- /* Trivial case */
-
- if (!s1 && !s2) {
- goto done;
- }
-
- if (!s1 || !s2) {
- return False;
- }
-
- /* Check top level stuff */
-
- if (s1->revision != s2->revision) {
- DEBUG(10, ("sec_desc_equal(): revision differs (%d != %d)\n",
- s1->revision, s2->revision));
- return False;
- }
-
- if (s1->type!= s2->type) {
- DEBUG(10, ("sec_desc_equal(): type differs (%d != %d)\n",
- s1->type, s2->type));
- return False;
- }
-
- /* Check owner and group */
-
- if (!sid_equal(s1->owner_sid, s2->owner_sid)) {
- DEBUG(10, ("sec_desc_equal(): owner differs (%s != %s)\n",
- sid_string_dbg(s1->owner_sid),
- sid_string_dbg(s2->owner_sid)));
- return False;
- }
-
- if (!sid_equal(s1->group_sid, s2->group_sid)) {
- DEBUG(10, ("sec_desc_equal(): group differs (%s != %s)\n",
- sid_string_dbg(s1->group_sid),
- sid_string_dbg(s2->group_sid)));
- return False;
- }
-
- /* Check ACLs present in one but not the other */
-
- if ((s1->dacl && !s2->dacl) || (!s1->dacl && s2->dacl) ||
- (s1->sacl && !s2->sacl) || (!s1->sacl && s2->sacl)) {
- DEBUG(10, ("sec_desc_equal(): dacl or sacl not present\n"));
- return False;
- }
-
- /* Sigh - we have to do it the hard way by iterating over all
- the ACEs in the ACLs */
-
- if (!sec_acl_equal(s1->dacl, s2->dacl) ||
- !sec_acl_equal(s1->sacl, s2->sacl)) {
- DEBUG(10, ("sec_desc_equal(): dacl/sacl list not equal\n"));
- return False;
- }
-
- done:
- DEBUG(10, ("sec_desc_equal(): secdescs are identical\n"));
- return True;
-}
-
-/*******************************************************************
Given a security_descriptor return the sec_info.
********************************************************************/