7 /* lookup name of real user
9 /* #include <username.h>
11 /* const char *username()
13 /* username() jumps whatever system-specific hoops it takes to
14 /* get the name of the user who started the process. The result
15 /* is volatile. Make a copy if it is to be used for an appreciable
20 /* The Secure Mailer license must be distributed with this software.
23 /* IBM T.J. Watson Research
25 /* Yorktown Heights, NY 10598, USA
34 /* Utility library. */
38 /* username - get name of user */
40 const char *username(void)
46 if ((pwd
= getpwuid(uid
)) == 0)
48 return (pwd
->pw_name
);