logname
Purpose
Returns the login name of the user.
Library
Programmers Workbench Library (libPW.a)
Syntax
char *logname ( )
Description
The logname subroutine returns a pointer to the
null-terminated login name. The logname subroutine
extracts the LOGNAME variable from the user's environ-
ment.
Note: 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. For
better methods, see "cuserid," "getlogin," and
"getpwent, getpwuid, getpwnam, setpwent, endpwent."
File
/etc/profile
Related Information
In this book: "profile" and "environment."
The env and login commands in AIX Operating System Com-
mands Reference.