windows - LookupAccountNameW returns SidTypeAlias, but expected SidTypeGroup -


i'm trying define type of entered credentials with:

sid_name_use pe; ... resolved=lookupaccountnamew (null,l"builtin\users",&sid,&cbsid,buff,&dd,&pe); 

no matter if enter "builtin\users" or "users" resolves returns sidtypealias in pe enum. expect sidtypewellknowngroup or sidtypegroup.

question: how reliably define if given string windows group name ?

the msdn page well-known sids briefly describes meaning of "alias" in context:

the following table has examples of domain-relative rids can use form well-known sids local groups (aliases).

one of table entries users group, behaviour describing expected.

you can continue use lookupaccountname() planned, need modify code recognize of sidtypealias, sidtypewellknowngroup, or sidtypegroup represent groups.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -