Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!att!holin!bes From: bes@holin.ATT.COM (Bradley Smith) Newsgroups: comp.unix.wizards Subject: Re: help me, please, help me Summary: I tried it and didn't see it Message-ID: <470@holin.ATT.COM> Date: 13 Apr 89 18:26:18 GMT References: <1022@aplcen.apl.jhu.edu> Organization: AT&T Bell Labs, OIL, Holmdel, NJ Lines: 29 In article <1022@aplcen.apl.jhu.edu>, arrom@aplcen.apl.jhu.edu (Ken Arromdee) writes: # I have a program which is run setuid. I want to set the uid back to the # original before exec'ing a shell. It doesn't work. The following illustrates # the problem (it's run on an AT&T 3B4000 with SYSV). (uids is just a small # program to print out one's real and effective uids). # -------------------------------------------------------------- # % uids # Real: user 7943 (ins_akaa), group 2048 # Effective: user 7943 (ins_akaa), group 2048 # % cd /s/adev/src/h/src # % cat test.c [stuff deleted] # % ls -l a.out # -rwsr-xr-x 1 adev 210 19905 Apr 10 23:10 a.out* # % a.out # Before setuid(getuid()) # Real UID=7943; effective UID=210 # After setuid(getuid()) # Real UID=7943; effective UID=7943 # % uids # Real: user 7943 (ins_akaa), group 2048 # Effective: user 210 (adev), group 2048 I tried it (wrote a uids program) and did not see this results on a 3B4000 running 3.1.5 release of UNIX. -- Bradley Smith Computer Systems Offer Integration Laboratory AT&T Bell Labs, Holmdel, NJ 201-949-0090 att!holin!bes or bes@holin.ATT.COM