diff common/util.h @ 1118:fd85a02d771d

(issue54) Implement a privilege drop to execute the program after installation. This commit is extremly ugly as I accidentally worked in a working tree that was partially merged with default. To review the real change please check the commit that will merge this branch into default.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 16 Sep 2014 19:45:19 +0200
parents 1c1964c27b39 f110a3f6e387
children 0a803c3fb5a6
line wrap: on
line diff
--- a/common/util.h	Tue Sep 16 11:45:32 2014 +0200
+++ b/common/util.h	Tue Sep 16 19:45:19 2014 +0200
@@ -150,6 +150,23 @@
   */
 bool has_high_integrity(HANDLE hToken);
 
+/** @brief get a restricted access token to execute nss process
+  *
+  * This function uses the Software Restriction API to obtain the
+  * access token for a process run als normal user.
+  *
+  * @returns A restricted handle or NULL on error.
+  */
+HANDLE get_restricted_token();
+
+/** @brief get a normal user access token
+  *
+  * The trusted acces token is not elevated but has the normal user rights.
+  *
+  * @returns A normal user handle or NULL on error.
+  */
+HANDLE get_normal_token();
+
 #endif
 
 #ifdef __cplusplus

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