Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.unix.wizards Subject: Re: access(2) (was: Writing to A NON-Existing File in "C") Message-ID: <899@cresswell.quintus.UUCP> Date: 25 Apr 88 06:54:24 GMT References: <975@unmvax.unm.edu> <2089@munnari.oz> Organization: Quintus Computer Systems, Mountain View, CA Lines: 13 Summary: egg on my face 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.