|
|
1.1 ! root 1: .TH GETLOGIN 3 "19 January 1983" ! 2: .SH NAME ! 3: getlogin \- get login name ! 4: .SH SYNOPSIS ! 5: .B char *getlogin() ! 6: .SH DESCRIPTION ! 7: .I Getlogin ! 8: returns a pointer to the login name as found in ! 9: .IR /etc/utmp . ! 10: It may be used in conjunction with ! 11: .I getpwnam ! 12: to locate the correct password file entry when the same userid ! 13: is shared by several login names. ! 14: .PP ! 15: If ! 16: .I getlogin ! 17: is called within a process that is not attached to a ! 18: typewriter, it returns NULL. ! 19: The correct procedure for determining the login name is to first call ! 20: .I getlogin ! 21: and if it fails, to call ! 22: .IR getpw ( getuid ()). ! 23: .SH FILES ! 24: /etc/utmp ! 25: .SH "SEE ALSO" ! 26: getpwent(3), getgrent(3), utmp(5), getpw(3) ! 27: .SH DIAGNOSTICS ! 28: Returns NULL (0) if name not found. ! 29: .SH BUGS ! 30: The return values point to static data ! 31: whose content is overwritten by each call.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.