/* * Sample program for geteuid and getegid system call - No.49 and No.50 * * getuid, geteuid - get user identity * getgid, getegid - get group identity * * Synopsis * #include * #include * * uid_t getuid(void); * uid_t geteuid(void); * gid_t getgid(void); * gid_t getegid(void); */ #include main() { printf("real uid = %d\n", getuid()); printf("effective uid = %d\n", geteuid()); printf("real gid = %d\n", getgid()); printf("effective uid = %d\n", getegid()); exit(0); }