Re: KSH setuid script doesn't work?
Posted in 1996
In article <821709080snz@excelsis.demon.co.uk>, Sally@excelsis.demon.co.uk says... >In article <4d3jmv$2so@mars.spaceworks.com> > msm@spaceworks.com "Michael Mstowski" writes: > >> I've written a ksh script that tries to read >> from a table with security restrictions. I changed >> the script to setuid to the owner of the table to >> try to read the secure rows. This didn't work >> on HP/UX with Informix 5.03. The script didn't work >> as setuid of Informix. Any help is appreciated. > >This is a shell problem not an Informix problem as lots of >UNIXs don't support 'setuid' bits on shell scripts. I don't think it's the shell setuid problem. HPUX allows setuid scripts. Unix tracks two user ID's for a process - an effective user ID and a real user ID. In Informix 5.03, the sqlturbo process itself takes over the effective user id, and uses the real user ID - which is not effected by the setuid bit on the script - to get the user of the process. I may be describing it in reverse of what actually happens, but the result is that setting the suid bit on a script or program is not sufficient to get a script to run as that user. -- William Harris (Standard disclaimers) CARS Information Systems william@carsinfo.com 4000 Executive Park Drive Cincinnati, OH (USA) 45241