Re: set-uid on shell scripts in Solaris
Posted in 1994
}From: yogen@astro.ocis.temple.edu (Yogen Sanghani) }Subject: set-uid on shell scripts in Solaris }Date: 19 Jul 1994 22:30:43 GMT } }Is there any difference in the way set-uid bit works in Solaris from SunOS? }I need a shell script with set-uid, owned by root and to be executed by }operators. ... One way might be to write a C program, say execsuid, which is setuid root, and has numerous links (different names) in say /usr/local/bin. It could look at its own name (argv[0]) minus any path components then look in a hardwired directory (say /usr/local/setuidscripts) for a script with the same name and run it, passing it its arguments via execv(). This should be secure as long as the setuidscripts dir is writable only by root, and you could write a script (say installsetuid) which would do script=$1 cp $script /usr/local/setuidscripts ln /usr/local/lib/execsuid /usr/local/bin/$script to install any scripts you want to run setuid. Hope this helps Cheers Bill Bill Hails <bill@tardis.co.uk> Tel (UK) 0483 300 200