Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!rice!uw-beaver!ubc-cs!unixg.ubc.ca!gauguin.ucs.ubc.ca!hilchey From: hilchey@ucs.ubc.ca (Paul Hilchey) Newsgroups: comp.sys.sgi Subject: Re: ELM problem (for the curious). Message-ID: <1991Mar1.212820.11720@unixg.ubc.ca> Date: 1 Mar 91 21:28:20 GMT References: <9103011515.AA17958@centr00.CENTRCN.UMontreal.CA> Sender: news@unixg.ubc.ca (Usenet News Maintenance) Reply-To: hilchey@ucs.ubc.ca (Paul Hilchey) Organization: University of British Columbia Lines: 26 chouinar@centrcn.umontreal.ca (Luc Chouinard) writes: > Setgid progams . . . can change the current egid to the current gid > but they cannot perform the inverse (i.e. egid=gid of the program). This works fine if you use setgid instead of setegid. Eg: egid = getegid(); printf("%d\n",getegid()); setgid(getgid()); printf("%d\n",getegid()); setgid(egid); printf("%d\n",getegid()); produces the expected result with Irix 3.3.1. It doesn't work with SunOS 4.1.1, though. A related question: Elm changes the effective uid/gid back to the real ones before calling the access function, though on all the systems I've checked, access is done w.r.t. the real uid/gid. Are there any systems on which that isn't true? ____ Paul Hilchey University Computing Services The University of British Columbia