From: msimons@csugrad.cs.vt.edu (Mike Simons)
Subject: Re: Help: Set-user-ID
Date: 8 Mar 1995 11:02:02 -0500 [thread overview]
Message-ID: <3jkkdq$pbs@csugrad.cs.vt.edu> (raw)
In-Reply-To: RPBLAKE.95Mar7081755@ASSP01.open.ac.uk
Robert Blake (rpblake@ASSP01.open.ac.uk) wrote:
: I've been trying to write a shell script that other users can run and appear
: to be me for the duration of the command. I'm using Alpha OSF/1 v1.3.
: I've written a very simple shell script called fred:
: #!/bin/sh
: echo Hi!!
: whoami
: rm /usr/user1/temp/test~
: test~ is a file that only user1 has write permission to. Having written this as
: user1, I then 'chmod 4655 fred' so the permissions look thus:
: -rwSr-xr-x 1 user1 physics 117 Mar 07 14:53 fred
: Anyone any idea what I'm doing wrong?
Well... If I understand things correctly OSF ignores the set UID and
GID bits for script files of any type. Basically if binary file then it
checks the UID and GID bits... and sets the appropriate permissions on the
process otherwise it runs with the permissions of the user who invoked the
script.
Apparently SID and GID script files have been and are a real big
security whole on Unix systems... so OSF decided to do away with the
whole problem.
What I would recommend (and what I was told) is to write a short
c-program to do whatever you were going to do, compile it, and then
set UID on that.
Hope that helps,
Mike Simons
msimons@csugrad.cs.vt.edu
next prev parent reply other threads:[~1995-03-08 16:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-07 15:17 Help: Set-user-ID Robert Blake
1995-03-08 16:02 ` Mike Simons [this message]
1995-03-08 22:33 ` Walter Karig
1995-03-09 3:37 ` Spider Boardman
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox