CUSERID(3)

NAME
cuserid - get user name associated with effective UID

SYNOPSIS
#include <stdio.h>
char *
cuserid(char *s);

DESCRIPTION
The cuserid function is made obsolete by getpwuid.
It is available from the compatibility library, libcompat.

The function cuserid gets the user name associated with the effective UID of the current process. If the argument s is non-zero, the name is copied to the buffer it is pointing to, and that address is being returned. This buffer must provide space for at least L_cuserid characters, this constant is defined in ~ <stdio.h>. If s is zero, an internal array is used an its address will be returned.

RETURN VALUES
cuserid returns the address of an array where the name has been stored to. If the name associated with the effective UID of the current process could not be found, either a null pointer will be returned, or ( if s is non-zero) the buffer s will be filled with a null string.

SEE ALSO
getpwuid(3), geteuid(2).