Newsgroups: comp.unix.aix Path: utzoo!utgpu!cunews!nrcnet0!cfd.di.nrc.ca!ng From: ng@cfd.di.nrc.ca (Kai Ng) Subject: Re: Message-ID: <1991Feb14.162043.2900@nrcnet0.nrc.ca> Sender: root@nrcnet0.nrc.ca (Operator) Nntp-Posting-Host: cfd.di.nrc.ca Reply-To: ng@cfd.di.nrc.ca Organization: Informatics, National Research Council Canada References: <1991Feb12.184920.5967@nrcnet0.nrc.ca> <5321@awdprime.UUCP> Date: Thu, 14 Feb 91 16:20:43 GMT In article <5321@awdprime.UUCP>, jfh@greenber.austin.ibm.com (John F Haugh II) writes: |> |> "If the process has appropriate privileges, the setgid() |> functions sets the real group ID, effective group ID, and |> saved set-group-ID to gid." |> If you execute the setgid() function when the effective GID is not |> 0, you should see the behavior that you expect. |> -- |> John F. Haugh II | I've Been Moved | MaBellNet: (512) 838-4340 |> SneakerNet: 809/1D064 | AGAIN ! | VNET: LCCB386 at AUSVMQ |> BangNet: ..!cs.utexas.edu!ibmchs!auschs!snowball.austin.ibm.com!jfh (e-i-e-i-o) John, First of all, how can I reply to you by email. The usr@...ibm.com addresses never work. You are right about the behavior of setgid() and setuid(). If I have mode set to 6755 and call the setgid() before setuid(), I'll get the result as I expected. That means should never trust the manual (or man page). It has never mentioned the setgid behavior could be under the mercy of setuid. Thanks for your information. ...Kai -- ----------------------------------------------------------------------------- Kai S. Ng Informatics, National Research Council Canada INTERNET ng@cfd.di.nrc.ca M-60 Montreal Road, Ottawa, Canada K1A 0R6 BITNET kain@nrcvm01.bitnet VOICE (613) 993-0240 FAX (613) 954-2561