Hi,

Am 17.04.2012 um 22:57 schrieb William Hay:

> prolog                       root@/sbin/busybox env -u BASH_ENV -u
> LD_LIBRARY_PATH -u LD_PRELOAD -u PERL5OPT -u PERLLIB -u IFS
> /cm/shared/apps/sge/current/cm/prolog

Using a static busybox is a good approach, but I would suggest to use also the 
full path to `env`. The user could prepare something in $TMPDIR as it's 
included in the default path set by SGE which is: 
$TMPDIR:/usr/local/bin:/bin:/usr/bin unless it’s overriden by the user with the 
option -v PATH to the qsub command, then it’s $TMPDIR:$PATH

I never ran rooted scripts, so I realized only yesterday that an exported shell 
function like "[" or "cd" might surprise the script too. Unless the complete 
environment is ignored, a rooted bash script should be started with the option 
-p to enable privileged mode, which won't import shell functions (and also 
ignores $BASH_ENV).

-- Reuti
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to