Programming and posix - April 2002
April 3, 2002
Solution Symposium
Page 45
hp e3000
programming
and posix
user management - getuid()/setuid()
• uid_t getuid (void);
• returns the POSIX UID of the calling process
• int setuid(uid_t uid);
• changes the POSIX UID of the calling process
• requires GETPRIVMODE()
• if you change to a UID in another MPE account, the
POSIX GID will also be changed to match the new
account