/**************************************************************************** display sec_desc structure ****************************************************************************/ void display_sec_desc(struct security_descriptor *sec) { char *sid_str; if (!sec) { printf("NULL\n"); return; } printf("revision: %d\n", sec->revision); display_acl_type(sec->type); if (sec->sacl) { printf("SACL\n"); display_sec_acl(sec->sacl); } if (sec->dacl) { printf("DACL\n"); display_sec_acl(sec->dacl); } if (sec->owner_sid) { sid_str = dom_sid_string(NULL, sec->owner_sid); printf("\tOwner SID:\t%s\n", sid_str); talloc_free(sid_str); } if (sec->group_sid) { sid_str = dom_sid_string(NULL, sec->group_sid); printf("\tGroup SID:\t%s\n", sid_str); talloc_free(sid_str); } }
/**************************************************************************** display sec_desc structure ****************************************************************************/ void display_sec_desc(SEC_DESC *sec) { fstring sid_str; if (sec->sacl) { printf("SACL\n"); display_sec_acl(sec->sacl); } if (sec->dacl) { printf("DACL\n"); display_sec_acl(sec->dacl); } if (sec->owner_sid) { sid_to_string(sid_str, sec->owner_sid); printf("\tOwner SID:\t%s\n", sid_str); } if (sec->grp_sid) { sid_to_string(sid_str, sec->grp_sid); printf("\tParent SID:\t%s\n", sid_str); } }