loginid vs. uid.
BURNS,JIM
gt0178a at prism.gatech.EDU
Tue Jul 17 15:31:29 AEST 1990
in article <9007162005.AA11293 at mindcrf.mindcraft.com>, karish at mindcrf.UUCP says:
[discussion of what SVID and POSIX do]
>
> The point of having separate logname() and getuid() functions is
> to maintain the login ID and the real UID as separate concepts.
The following are man logname excerpts from 1) SunOs 4.0, and 2)AU/X 1.1
(SVR2):
1)
DESCRIPTION
logname returns the contents of the environment variable
LOGNAME, which is set when a user logs into the system.
Sun Release 4.0 Last change: 9 September 1987 1
2) man 1 logname says the same thing, while man 3x logname says (in part):
DESCRIPTION
logname returns a pointer to the null-terminated login name;
it extracts the $LOGNAME variable from the user's environ-
ment.
BUGS
This method of determining a login name is subject to for-
gery.
Interestingly enough, when I do a su - on AU/X, logname and $LOGNAME both
report the account I su'd to, whereas under SunOs, $LOGNAME reports the
account I su'd to, and logname returns the account I su'd from, in
contradiction to its man page. (My .profile and the system's
/local/etc/profile don't do anything strange to $LOGNAME.)
Sequent Dynix apparently doesn't support logname.
--
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a at prism.gatech.edu
More information about the Comp.unix.questions
mailing list