Reputation: 1368
It is possible to get service permissions via command line:
C:\Users\myname>sc sdshow EventSystem
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCR
RC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
How can I get this value via C++ code and winapi
?
Upvotes: 0
Views: 201
Reputation: 612963
From Service Security and Access Rights on MSDN:
To get or set the security descriptor for a service object, use the
QueryServiceObjectSecurity
andSetServiceObjectSecurity
functions. For more information, see Modifying the DACL for a Service.
So there's the answer. You call QueryServiceObjectSecurity
.
Upvotes: 1