Go to the previous, next section.

geteuid and getuid

SYNOPSIS

uid_t getuid(void);

uid_t geteuid(void);

DESCRIPTION

getuid retreives the real uid of the current task. The real uid is the one of the user who started the task. geteuid retreives the effective uid of the current task. The effective uid is the uid of the executable file if the SUID bit of the file is set (otherwise, it is equal to the real uid).

RETURN VALUE

getuid: the real uid.

geteuid: the effective uid.

Go to the previous, next section.