win_whoami: removed logon_sid from return results (#34425)
This commit is contained in:
parent
278663ad2c
commit
6c754d9d1c
3 changed files with 1 additions and 44 deletions
|
@ -40,7 +40,6 @@ namespace Ansible
|
||||||
|
|
||||||
// TOKEN_GROUPS
|
// TOKEN_GROUPS
|
||||||
public ArrayList Groups { get; internal set; }
|
public ArrayList Groups { get; internal set; }
|
||||||
public Sid LogonSid { get; internal set; }
|
|
||||||
public ArrayList Rights { get; internal set; }
|
public ArrayList Rights { get; internal set; }
|
||||||
|
|
||||||
// TOKEN_MANDATORY_LABEL
|
// TOKEN_MANDATORY_LABEL
|
||||||
|
@ -570,7 +569,6 @@ namespace Ansible
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Current Process LogonSID, User Rights and Groups
|
// Get Current Process LogonSID, User Rights and Groups
|
||||||
Sid logonSid = null;
|
|
||||||
ArrayList userRights = new ArrayList();
|
ArrayList userRights = new ArrayList();
|
||||||
ArrayList userGroups = new ArrayList();
|
ArrayList userGroups = new ArrayList();
|
||||||
TOKEN_GROUPS groups;
|
TOKEN_GROUPS groups;
|
||||||
|
@ -598,9 +596,7 @@ namespace Ansible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Do not include the Logon SID in the groups category
|
// Do not include the Logon SID in the groups category
|
||||||
if (attributes.HasFlag(TokenGroupAttributes.SE_GROUP_LOGON_ID))
|
if (!attributes.HasFlag(TokenGroupAttributes.SE_GROUP_LOGON_ID))
|
||||||
logonSid = new Sid(sidAndAttribute.Sid);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Hashtable groupInfo = new Hashtable();
|
Hashtable groupInfo = new Hashtable();
|
||||||
Sid group = new Sid(sidAndAttribute.Sid);
|
Sid group = new Sid(sidAndAttribute.Sid);
|
||||||
|
@ -645,7 +641,6 @@ namespace Ansible
|
||||||
Marshal.FreeHGlobal(tokenStatsPtr);
|
Marshal.FreeHGlobal(tokenStatsPtr);
|
||||||
|
|
||||||
SessionInfo sessionInfo = GetSessionDataForLogonSession(tokenStats.AuthenticationId);
|
SessionInfo sessionInfo = GetSessionDataForLogonSession(tokenStats.AuthenticationId);
|
||||||
sessionInfo.LogonSid = logonSid;
|
|
||||||
sessionInfo.Groups = userGroups;
|
sessionInfo.Groups = userGroups;
|
||||||
sessionInfo.Label = integritySid;
|
sessionInfo.Label = integritySid;
|
||||||
sessionInfo.ImpersonationLevel = tokenStats.ImpersonationLevel;
|
sessionInfo.ImpersonationLevel = tokenStats.ImpersonationLevel;
|
||||||
|
|
|
@ -133,31 +133,6 @@ groups:
|
||||||
"type": "Alias"
|
"type": "Alias"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
logon_sid:
|
|
||||||
description: The logon SID details.
|
|
||||||
returned: success
|
|
||||||
type: complex
|
|
||||||
contains:
|
|
||||||
domain_name:
|
|
||||||
description: The domain name of the logon SID.
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: NT AUTHORITY
|
|
||||||
sid:
|
|
||||||
description: The SID in string form.
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: S-1-5-5-0-4163312
|
|
||||||
account_name:
|
|
||||||
description: The account name of the logon SID.
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: LogonSessionId_0_4163312
|
|
||||||
type:
|
|
||||||
description: The type of SID.
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
sample: Logon
|
|
||||||
account:
|
account:
|
||||||
description: The running account SID details.
|
description: The running account SID details.
|
||||||
returned: success
|
returned: success
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
- win_whoami_result.login_time is defined
|
- win_whoami_result.login_time is defined
|
||||||
- win_whoami_result.logon_id is defined
|
- win_whoami_result.logon_id is defined
|
||||||
- win_whoami_result.logon_server is defined
|
- win_whoami_result.logon_server is defined
|
||||||
- win_whoami_result.logon_sid.account_name is defined
|
|
||||||
- win_whoami_result.logon_sid.domain_name is defined
|
|
||||||
- win_whoami_result.logon_sid.sid is defined
|
|
||||||
- win_whoami_result.logon_sid.type == 'Logon'
|
|
||||||
- win_whoami_result.logon_type.startswith('Network')
|
- win_whoami_result.logon_type.startswith('Network')
|
||||||
- win_whoami_result.privileges is defined
|
- win_whoami_result.privileges is defined
|
||||||
- win_whoami_result.rights|count >= 1
|
- win_whoami_result.rights|count >= 1
|
||||||
|
@ -71,7 +67,6 @@
|
||||||
- win_whoami_result.login_time is defined
|
- win_whoami_result.login_time is defined
|
||||||
- win_whoami_result.logon_id is defined
|
- win_whoami_result.logon_id is defined
|
||||||
- win_whoami_result.logon_server is defined
|
- win_whoami_result.logon_server is defined
|
||||||
- win_whoami_result.logon_sid == None
|
|
||||||
- win_whoami_result.logon_type == 'System'
|
- win_whoami_result.logon_type == 'System'
|
||||||
- win_whoami_result.privileges is defined
|
- win_whoami_result.privileges is defined
|
||||||
- win_whoami_result.rights|count >= 1
|
- win_whoami_result.rights|count >= 1
|
||||||
|
@ -164,10 +159,6 @@
|
||||||
- win_whoami_result.login_time is defined
|
- win_whoami_result.login_time is defined
|
||||||
- win_whoami_result.logon_id is defined
|
- win_whoami_result.logon_id is defined
|
||||||
- win_whoami_result.logon_server is defined
|
- win_whoami_result.logon_server is defined
|
||||||
- win_whoami_result.logon_sid.account_name is defined
|
|
||||||
- win_whoami_result.logon_sid.domain_name is defined
|
|
||||||
- win_whoami_result.logon_sid.sid is defined
|
|
||||||
- win_whoami_result.logon_sid.type == 'Logon'
|
|
||||||
- win_whoami_result.logon_type == "Interactive"
|
- win_whoami_result.logon_type == "Interactive"
|
||||||
- win_whoami_result.privileges is defined
|
- win_whoami_result.privileges is defined
|
||||||
- '"SeInteractiveLogonRight" in win_whoami_result.rights'
|
- '"SeInteractiveLogonRight" in win_whoami_result.rights'
|
||||||
|
@ -205,10 +196,6 @@
|
||||||
- win_whoami_result.login_time is defined
|
- win_whoami_result.login_time is defined
|
||||||
- win_whoami_result.logon_id is defined
|
- win_whoami_result.logon_id is defined
|
||||||
- win_whoami_result.logon_server is defined
|
- win_whoami_result.logon_server is defined
|
||||||
- win_whoami_result.logon_sid.account_name is defined
|
|
||||||
- win_whoami_result.logon_sid.domain_name is defined
|
|
||||||
- win_whoami_result.logon_sid.sid is defined
|
|
||||||
- win_whoami_result.logon_sid.type == 'Logon'
|
|
||||||
- win_whoami_result.logon_type == "Interactive"
|
- win_whoami_result.logon_type == "Interactive"
|
||||||
- win_whoami_result.privileges is defined
|
- win_whoami_result.privileges is defined
|
||||||
- win_whoami_result.rights == []
|
- win_whoami_result.rights == []
|
||||||
|
|
Loading…
Reference in a new issue