Skip to contentSkip to conversation

using mount from SUID scripts?

DISCUSSION Jesse Pollard 1 participant 1 message Aug 8, 2001

lore
Share & tools
lore
#0 lore raw

...

Quoted 6 lines

Unfortunately, the snippit of code here doesn't do the job... after the first two lines, the UID is unchanged, while the EUID is still 0 (root). I used system "/usr/bin/id" to verify this. /bin/mount is still complaining.

Oh, wait... $> is effective and $< is real. So that first line should be ($r, $e) =3D ($<, $>); -- this makes everything happy!

drat... I thought I had that right...

Also the last line should be swapped too:

	($r, $e) = ($<, $>);
	$< =3D $e;
	<<<do stuff>>>
	($<, $>) = ($r,$e);

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]

Any opinions expressed are solely my own.