1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-24 21:49:29 +03:00

Changes from APPLIANCE_HEAD:

- add some debugs for comparing two security descriptors.
      (source/rpc_parse/parse_sec.c)
(This used to be commit 505a8a2277)
This commit is contained in:
David O'Neill
2000-12-14 19:31:24 +00:00
parent 57779c6f3b
commit 1fc3e43f9b

View File

@ -348,11 +348,14 @@ BOOL sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
{
/* Trivial case */
if (!s1 && !s2) return True;
if (!s1 && !s2) {
goto done;
}
/* Check top level stuff */
if (s1->revision != s2->revision || s1->type != s2->type) {
DEBUG(10, ("sec_desc_equal(): revision/type not equal\n"));
return False;
}
@ -360,6 +363,7 @@ BOOL sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
if (!sid_equal(s1->owner_sid, s2->owner_sid) ||
!sid_equal(s1->grp_sid, s2->grp_sid)) {
DEBUG(10, ("sec_desc_equal(): owner/group not equal\n"));
return False;
}
@ -367,6 +371,7 @@ BOOL sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
if ((s1->dacl && !s2->dacl) || (!s1->dacl && s2->dacl) ||
(s1->sacl && !s2->sacl) || (!s1->sacl && s2->sacl)) {
DEBUG(10, ("sec_desc_equal(): dacl/sacl not equal\n"));
return False;
}
@ -375,9 +380,12 @@ BOOL sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2)
if (!sec_acl_equal(s1->dacl, s2->dacl) ||
!sec_acl_equal(s1->sacl, s2->sacl)) {
DEBUG(10, ("sec_desc_equal(): dacl/dacl list not equal\n"));
return False;
}
done:
DEBUG(10, ("sec_equal(): secdescs are identical\n"));
return True;
}