Mercurial > trustbridge
diff common/util.h @ 524:a097dd86cb4d
merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 29 Apr 2014 15:26:43 +0200 |
parents | 78959fd970b0 |
children | 175370634226 |
line wrap: on
line diff
--- a/common/util.h Tue Apr 29 15:26:02 2014 +0200 +++ b/common/util.h Tue Apr 29 15:26:43 2014 +0200 @@ -12,6 +12,10 @@ */ #include <stdbool.h> +#ifdef __cplusplus +extern "C" { +#endif + /**@brief Check if the current process is running with elevated privileges. * * Elevates the current process token to check if it is marked as elevated. @@ -20,4 +24,17 @@ * @returns true if the current process is elevated.*/ bool is_elevated(); +/**@brief Check if the user is in the administrators group. + * + * The function checks if the account that startet this process + * belongs to a user that is a member of the Administrators group. + * + * @returns True if the user is in the admin group. False otherwise or on error. + */ +bool is_admin(); + +#ifdef __cplusplus +} +#endif + #endif // COMMON_UTIL_H