Added AdminCount support
This commit is contained in:
parent
444e673c6e
commit
2eeabd8558
|
@ -1,3 +1,7 @@
|
|||
Version 2.14
|
||||
- Added support for reading security descriptors (ACLs) from both ntds.dit files and DRS-R.
|
||||
- Added support for the AdminCount attribute.
|
||||
|
||||
Version 2.13.1
|
||||
- Fixed a bug regarding incorrect OS version detection.
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ using System.Security.Principal;
|
|||
private string samAccountName;
|
||||
private string upn;
|
||||
private bool isDeleted;
|
||||
private bool adminCount;
|
||||
private SecurityIdentifier[] sidHistory;
|
||||
private RawSecurityDescriptor securityDescriptor;
|
||||
private DateTime? lastLogon;
|
||||
|
@ -55,6 +56,9 @@ using System.Security.Principal;
|
|||
// Security Descriptor:
|
||||
dsObject.ReadAttribute(CommonDirectoryAttributes.SecurityDescriptor, out this.securityDescriptor);
|
||||
|
||||
// AdminCount (Although the schema defines it as Int32, it can only have values 0 and 1, so we directly convert it to bool)
|
||||
dsObject.ReadAttribute(CommonDirectoryAttributes.AdminCount, out this.adminCount);
|
||||
|
||||
// Enabled:
|
||||
// TODO: Move to DirectoryObject?
|
||||
int? numericUac;
|
||||
|
@ -293,6 +297,20 @@ using System.Security.Principal;
|
|||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that a given object has had its ACLs changed to a more secure value
|
||||
/// by the system because it was a member of one of the administrative groups
|
||||
/// (directly or transitively).
|
||||
/// </summary>
|
||||
public bool AdminCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.adminCount;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the account's password in Windows NT operating system one-way format (OWF).
|
||||
/// </summary>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
attributes.Add((ISchemaAttribute)new BasicSchemaAttribute(CommonDirectoryAttributes.PrimaryGroupIdId, CommonDirectoryAttributes.PrimaryGroupId, AttributeSyntax.Int));
|
||||
attributes.Add((ISchemaAttribute)new BasicSchemaAttribute(CommonDirectoryAttributes.CurrentValueId, CommonDirectoryAttributes.CurrentValue, AttributeSyntax.OctetString));
|
||||
attributes.Add((ISchemaAttribute)new BasicSchemaAttribute(CommonDirectoryAttributes.SecurityDescriptorId, CommonDirectoryAttributes.SecurityDescriptor, AttributeSyntax.SecurityDescriptor));
|
||||
attributes.Add((ISchemaAttribute)new BasicSchemaAttribute(CommonDirectoryAttributes.AdminCountId, CommonDirectoryAttributes.AdminCount, AttributeSyntax.Int));
|
||||
|
||||
return new BasicSchema(attributes);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
{
|
||||
public static class CommonDirectoryAttributes
|
||||
{
|
||||
public const string AdminCount = "adminCount";
|
||||
public const int AdminCountId = 589974;
|
||||
public const string AttributeId = "attributeID";
|
||||
public const int AttributeIdId = 131102;
|
||||
public const string AttributeOmSyntax = "oMSyntax";
|
||||
|
|
|
@ -409,6 +409,11 @@
|
|||
<PropertyName>Enabled</PropertyName>
|
||||
</ExpressionBinding>
|
||||
<NewLine />
|
||||
<Text>AdminCount: </Text>
|
||||
<ExpressionBinding>
|
||||
<PropertyName>AdminCount</PropertyName>
|
||||
</ExpressionBinding>
|
||||
<NewLine />
|
||||
<Text>Deleted: </Text>
|
||||
<ExpressionBinding>
|
||||
<PropertyName>Deleted</PropertyName>
|
||||
|
|
Loading…
Reference in New Issue