c++ - Getting primary domain SID without admin privileges -
i'm trying obtain computer's primary domain sid on windows using c++. have manged using lsaqueryinformationpolicy
policyprimarydomaininformation
parameter. i've opened lsa policy operation given:
auto lsastatus = lsaopenpolicy(server, &objectattributes, generic_read | policy_view_local_information, &policyhandle);
unfortunatelly, using lsaopenpolicy
requiers administrator privileges run , project i'm working on, cannot, since of users not have it. question - there way of obtaining current computer's primary domain sid without invoking admin rights? if there is, how should go doing using visual c++/mfc?
i have found solution problem. turns out made wrong assumption based on incorrect api description on msdn. can read here, lsaopenpolicy
seems require administrator privileges , article access masks did not nor did lead me anywhere find information needed privileges. stack overflow user tripshock , comment on similar topic here found out using policy_view_local_information
access flag not invoke admin rights. tested in program , virtual machine , turns out true.
Comments
Post a Comment