aheinecke@404: /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik aheinecke@404: * Software engineering by Intevation GmbH aheinecke@404: * aheinecke@404: * This file is Free Software under the GNU GPL (v>=2) aheinecke@404: * and comes with ABSOLUTELY NO WARRANTY! aheinecke@404: * See LICENSE.txt for details. aheinecke@404: */ aheinecke@321: #ifndef COMMON_UTIL_H aheinecke@321: #define COMMON_UTIL_H aheinecke@321: /* @file util.h aheinecke@321: * @brief The usual useful stuff that fit nowhere else aheinecke@321: */ aheinecke@321: #include aheinecke@321: aheinecke@321: /**@brief Check if the current process is running with elevated privileges. aheinecke@321: * aheinecke@321: * Elevates the current process token to check if it is marked as elevated. wilde@323: * Uses TokenElevation on windows and checks effective UID on Linux. aheinecke@321: * aheinecke@321: * @returns true if the current process is elevated.*/ aheinecke@321: bool is_elevated(); wilde@323: aheinecke@321: #endif // COMMON_UTIL_H