r23820: Display security_ace_object in LDAP security descriptors for debugging.
authorGünther Deschner <gd@samba.org>
Tue, 10 Jul 2007 21:04:57 +0000 (21:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:30 +0000 (12:28 -0500)
Guenther
(This used to be commit 3925e85812b2aded356866925382b1beb718cd44)

source3/libads/disp_sec.c

index 60749dbb21c850596f774678b0bc929659d2600a..1f5eb4166ac97320e99ba52f69f96b39e9cd9a84 100644 (file)
@@ -82,6 +82,20 @@ static void ads_disp_perms(uint32 type)
        puts("");
 }
 
+static void ads_disp_sec_ace_object(struct security_ace_object *object)
+{
+       if (object->flags & SEC_ACE_OBJECT_PRESENT) {
+               printf("Object type: SEC_ACE_OBJECT_PRESENT\n");
+               printf("Object GUID: %s\n", smb_uuid_string_static(
+                       object->type.type));
+       }
+       if (object->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) {
+               printf("Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n");
+               printf("Object GUID: %s\n", smb_uuid_string_static(
+                       object->inherited_type.inherited_type));
+       }
+}
+
 /* display ACE */
 static void ads_disp_ace(SEC_ACE *sec_ace)
 {
@@ -119,6 +133,10 @@ static void ads_disp_ace(SEC_ACE *sec_ace)
        printf("access SID:  %s\naccess type: %s\n", 
                sid_string_static(&sec_ace->trustee), access_type);
 
+       if (sec_ace_object(sec_ace->type)) {
+               ads_disp_sec_ace_object(&sec_ace->object.object);
+       }
+
        ads_disp_perms(sec_ace->access_mask);
 }