michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _UACHELPER_H_ michael@0: #define _UACHELPER_H_ michael@0: michael@0: class UACHelper michael@0: { michael@0: public: michael@0: static HANDLE OpenUserToken(DWORD sessionID); michael@0: static HANDLE OpenLinkedToken(HANDLE token); michael@0: static BOOL DisablePrivileges(HANDLE token); michael@0: static bool CanUserElevate(); michael@0: michael@0: private: michael@0: static BOOL SetPrivilege(HANDLE token, LPCTSTR privs, BOOL enable); michael@0: static BOOL DisableUnneededPrivileges(HANDLE token, michael@0: LPCTSTR *unneededPrivs, size_t count); michael@0: static LPCTSTR PrivsToDisable[]; michael@0: }; michael@0: michael@0: #endif