help me, please, help me

Bradley Smith bes at holin.ATT.COM
Fri Apr 14 04:26:18 AEST 1989


In article <1022 at aplcen.apl.jhu.edu>, arrom at 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 at holin.ATT.COM



More information about the Comp.unix.wizards mailing list