mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into SAMBA_3_2_0
This commit is contained in:
commit
3f1ac564c0
@ -65,6 +65,23 @@ void display_sec_access(SEC_ACCESS *info)
|
|||||||
printf("\t\tPermissions: 0x%x: %s\n", *info, get_sec_mask_str(*info));
|
printf("\t\tPermissions: 0x%x: %s\n", *info, get_sec_mask_str(*info));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
display sec_ace object
|
||||||
|
****************************************************************************/
|
||||||
|
static void 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 sec_ace structure
|
display sec_ace structure
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -86,14 +103,35 @@ void display_sec_ace(SEC_ACE *ace)
|
|||||||
case SEC_ACE_TYPE_SYSTEM_ALARM:
|
case SEC_ACE_TYPE_SYSTEM_ALARM:
|
||||||
printf("SYSTEM ALARM");
|
printf("SYSTEM ALARM");
|
||||||
break;
|
break;
|
||||||
|
case SEC_ACE_TYPE_ALLOWED_COMPOUND:
|
||||||
|
printf("SEC_ACE_TYPE_ALLOWED_COMPOUND");
|
||||||
|
break;
|
||||||
|
case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
|
||||||
|
printf("SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT");
|
||||||
|
break;
|
||||||
|
case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
|
||||||
|
printf("SEC_ACE_TYPE_ACCESS_DENIED_OBJECT");
|
||||||
|
break;
|
||||||
|
case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
|
||||||
|
printf("SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT");
|
||||||
|
break;
|
||||||
|
case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
|
||||||
|
printf("SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf("????");
|
printf("????");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf(" (%d) flags: %d\n", ace->type, ace->flags);
|
printf(" (%d) flags: %d\n", ace->type, ace->flags);
|
||||||
display_sec_access(&ace->access_mask);
|
display_sec_access(&ace->access_mask);
|
||||||
sid_to_string(sid_str, &ace->trustee);
|
sid_to_string(sid_str, &ace->trustee);
|
||||||
printf("\t\tSID: %s\n\n", sid_str);
|
printf("\t\tSID: %s\n\n", sid_str);
|
||||||
|
|
||||||
|
if (sec_ace_object(ace->type)) {
|
||||||
|
disp_sec_ace_object(&ace->object.object);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -110,7 +148,6 @@ void display_sec_acl(SEC_ACL *sec_acl)
|
|||||||
if (sec_acl->size != 0 && sec_acl->num_aces != 0)
|
if (sec_acl->size != 0 && sec_acl->num_aces != 0)
|
||||||
for (i = 0; i < sec_acl->num_aces; i++)
|
for (i = 0; i < sec_acl->num_aces; i++)
|
||||||
display_sec_ace(&sec_acl->aces[i]);
|
display_sec_ace(&sec_acl->aces[i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_acl_type(uint16 type)
|
void display_acl_type(uint16 type)
|
||||||
@ -187,6 +224,6 @@ void display_sec_desc(SEC_DESC *sec)
|
|||||||
|
|
||||||
if (sec->group_sid) {
|
if (sec->group_sid) {
|
||||||
sid_to_string(sid_str, sec->group_sid);
|
sid_to_string(sid_str, sec->group_sid);
|
||||||
printf("\tParent SID:\t%s\n", sid_str);
|
printf("\tGroup SID:\t%s\n", sid_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user