mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
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
|
||||
public ArrayList Groups { get; internal set; }
|
||||
public Sid LogonSid { get; internal set; }
|
||||
public ArrayList Rights { get; internal set; }
|
||||
|
||||
// TOKEN_MANDATORY_LABEL
|
||||
|
@ -570,7 +569,6 @@ namespace Ansible
|
|||
}
|
||||
|
||||
// Get Current Process LogonSID, User Rights and Groups
|
||||
Sid logonSid = null;
|
||||
ArrayList userRights = new ArrayList();
|
||||
ArrayList userGroups = new ArrayList();
|
||||
TOKEN_GROUPS groups;
|
||||
|
@ -598,9 +596,7 @@ namespace Ansible
|
|||
}
|
||||
}
|
||||
// Do not include the Logon SID in the groups category
|
||||
if (attributes.HasFlag(TokenGroupAttributes.SE_GROUP_LOGON_ID))
|
||||
logonSid = new Sid(sidAndAttribute.Sid);
|
||||
else
|
||||
if (!attributes.HasFlag(TokenGroupAttributes.SE_GROUP_LOGON_ID))
|
||||
{
|
||||
Hashtable groupInfo = new Hashtable();
|
||||
Sid group = new Sid(sidAndAttribute.Sid);
|
||||
|
@ -645,7 +641,6 @@ namespace Ansible
|
|||
Marshal.FreeHGlobal(tokenStatsPtr);
|
||||
|
||||
SessionInfo sessionInfo = GetSessionDataForLogonSession(tokenStats.AuthenticationId);
|
||||
sessionInfo.LogonSid = logonSid;
|
||||
sessionInfo.Groups = userGroups;
|
||||
sessionInfo.Label = integritySid;
|
||||
sessionInfo.ImpersonationLevel = tokenStats.ImpersonationLevel;
|
||||
|
|
|
@ -133,31 +133,6 @@ groups:
|
|||
"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:
|
||||
description: The running account SID details.
|
||||
returned: success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue