LOGNAME(S) UNIX System V LOGNAME(S)
Name
logname - return login name of user
Syntax
char *logname( )
Description
The logname function returns a pointer to the null-
terminated login name; it extracts the LOGNAME environment
variable from the user's environment.
This routine is kept in /lib/libPW.a and must be linked with
the -lPW flag.
Files
/etc/profile
See Also
getenv(S), profile(M), environ(M), env(C), login(M).
Notes
The return values point to static data whose content is
overwritten by each call.
This method of determining a login name is subject to
forgery.
Standards Conformance
logname is conformant with:
AT&T SVID Issue 2, Select Code 307-127;
and The X/Open Portability Guide II of January 1987.
(printed 6/20/89)