access(2) (was: Writing to A NON-Existing File in "C")

Richard A. O'Keefe ok at quintus.UUCP
Mon Apr 25 16:54:24 AEST 1988


I just said that "Them's the facts" about su(1) not changing the real
uid and gid, and exhibited a wee transcript to prove it.  I should read
the manual more closely, I really should.  The 'wmi' command reports
the effective and _LOGIN_ uid&gid, not the effective and _real_ uid&gid.

There are three things:
    -	the effective uid and gid (geteuid(), getegid())
    -	the real uid and gid (getuid(), getgid())
    -	who you logged in as (getlogin(), followed by getpwnam())
and all of them are discoverable.  su changes the first two but not the
third.

If I learn from my mistakes, pretty soon I'll know everything.



More information about the Comp.unix.wizards mailing list