Add Authz class to compute exact POSIX user perms in a security descriptor

* autoload.cc (AuthzAccessCheck): Import.
	(AuthzFreeContext): Import.
	(AuthzInitializeContextFromSid): Import.
	(AuthzInitializeContextFromToken): Import.
	(AuthzInitializeResourceManager): Import.
	* sec_helper.cc (get_sids_info): Remove.
	(class authz_ctx_cache_entry): New class.
	(class authz_ctx_cache): New class.
	(class authz_ctx): New class.
	(authz_get_user_attribute): New function.
	* security.h (get_sids_info): Drop prototype.
	(authz_get_user_attribute): Add prototype.
	* winlean.h (_AUTHZ_): Define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2015-08-17 18:29:24 +02:00
parent e2742d467a
commit 42fad6ffa5
5 changed files with 194 additions and 25 deletions

View File

@ -558,6 +558,12 @@ LoadDLLfunc (RegisterEventSourceW, 8, advapi32)
LoadDLLfunc (ReportEventW, 36, advapi32)
LoadDLLfunc (SystemFunction036, 8, advapi32) /* Aka "RtlGenRandom" */
LoadDLLfunc (AuthzAccessCheck, 36, authz)
LoadDLLfunc (AuthzFreeContext, 4, authz)
LoadDLLfunc (AuthzInitializeContextFromSid, 32, authz)
LoadDLLfunc (AuthzInitializeContextFromToken, 32, authz)
LoadDLLfunc (AuthzInitializeResourceManager, 24, authz)
LoadDLLfunc (DnsQuery_A, 24, dnsapi)
LoadDLLfunc (DnsRecordListFree, 8, dnsapi)