diff common/util.h @ 1029:6684e5012b7a

(issue98) Set integrity level to medium on restricted token and evaluate it to determine if the process is elevated.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 04 Sep 2014 11:00:55 +0200
parents 427e2e18b8c8
children 76cae27b5d83
line wrap: on
line diff
--- a/common/util.h	Wed Sep 03 15:48:34 2014 +0200
+++ b/common/util.h	Thu Sep 04 11:00:55 2014 +0200
@@ -136,6 +136,17 @@
   */
 bool create_restricted_directory (LPWSTR path);
 
+/**@briefu Check the integrity level of the token
+  *
+  * Returns true if the token has SECURITY_MANADTORY_HIGH_RID or
+  * SECURITY_MANDATORY_SYSTEM_RID and false otherwise.
+  *
+  * @param[in] hToken the Token to check
+  *
+  * @returns true if the token has at least high integrity.
+  */
+bool has_high_integrity(HANDLE hToken);
+
 #endif
 
 #ifdef __cplusplus

http://wald.intevation.org/projects/trustbridge/