Uniquely identifying a user: is it possible?
Jay Schuster
jay at banzai.PCC.COM
Wed Jan 10 12:39:22 AEST 1990
thad at cup.portal.com (Thad P Floryan) writes:
>In any event, what this all boils down to is the "simple" question:
> ===> Is there a way to 100% positively, absolutely, unequivocally, <===
> ===> unerringly identify the current login user's /etc/utmp session <===
> ===> record under ALL conditions of su'iness and output redirection <===
> ===> and multiple simultaneous logins? <===
Without reading /dev/kmem, I believe not.
If there was some way of getting your tty group ID, you could search
through utmp and find its pid there. But I don't think there's any
wany of finding your tty group id without searching through /dev/kmem.
End even then, if the process had detached itself (called setpgrp()),
it has no controlling terminal, and you wouldn't be able to find its
tty slot because the kernel will tell you that it has none.
>Sounds simple, no?
It doesn't sound simple, because UNIX doesn't really care what tty
you are logged on to, and loses that information rather easily. It
cares about the uid you are, but allows you to change it (su).
--
Jay Schuster <jay at pcc.COM> uunet!uvm-gen!banzai!jay, attmail!banzai!jay
The People's Computer Company `Revolutionary Programming'
More information about the Unix-pc.general
mailing list