source: box/trunk/lib/common/UnixUser.h @ 217

Revision 217, 748 bytes checked in by martin, 6 years ago (diff)

Set svn:eol-style as appropriate for all files

  • Property svn:eol-style set to native
Line 
1// --------------------------------------------------------------------------
2//
3// File
4//              Name:    UnixUser.h
5//              Purpose: Interface for managing the UNIX user of the current process
6//              Created: 21/1/04
7//
8// --------------------------------------------------------------------------
9
10#ifndef UNIXUSER__H
11#define UNIXUSER__H
12
13class UnixUser
14{
15public:
16        UnixUser(const char *Username);
17        UnixUser(uid_t UID, gid_t GID);
18        ~UnixUser();
19private:
20        // no copying allowed
21        UnixUser(const UnixUser &);
22        UnixUser &operator=(const UnixUser &);
23public:
24
25        void ChangeProcessUser(bool Temporary = false);
26
27        uid_t GetUID() {return mUID;}
28        gid_t GetGID() {return mGID;}
29
30private:
31        uid_t mUID;
32        gid_t mGID;
33        bool mRevertOnDestruction;
34};
35
36#endif // UNIXUSER__H
37
Note: See TracBrowser for help on using the repository browser.