Bug 184 - SUDO execution stops if a script contains command "."
SUDO execution stops if a script contains command "."
Status: RESOLVED INVALID
Product: Mktemp
Classification: Unclassified
Component: Documentation
1.5
IBM AIX
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-13 08:23 MDT by Patrick Emereau
Modified: 2005-06-23 01:21 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Emereau 2005-06-13 08:23:42 MDT
Hello,

The script "/prsyslib/ksh/rc.chene.pe" runs normally with root but stops if it 
runs via sudo.

Thank you for your help

See the example above

1) With command ". /prsyslib/ksh/oraenv.pe"

/www/chene/app>cat /prsyslib/ksh/rc.chene.pe
#!/bin/ksh
# rc.chene
# relance du serveur tomcat de l'application chene
#
#echo " ne pas lancer chene sur ce systeme"
#exit 0

. ~chene/.profile
/www/chene/app/lance_serveur_web.sh.pe

exit 0
<UNDEV1:1> (root)
/www/chene/app>

/www/chene/app/lance_serveur_web.sh.pe
…
export ORAENV_ASK=NO
echo "je vais exécuter . oraenv"
. /prsyslib/ksh/oraenv.pe
echo "j'ai exécuté . oraenv"
exit
       LIBPATH=$ORACLE_HOME/lib:$LIBPATH
…


/prsyslib/ksh/oraenv.pe
…
#####################################
echo "Je suis  dans oraenv point 01"
exit
case ${ORACLE_TRACE:-""} in
…

/home/chene>sudo /prsyslib/ksh/rc.chene.pe
cd /www/chene/app
/www/chene/app
ORASID          = [DCRE]
JAVA_HOME       = [/usr/java131]
PORT_HTTP       = [80]
PORT_INTERNE    = [8651]
je vais exécuter . oraenv
Je suis  dans oraenv point 01
<UNDEV1:1> (chene)
/home/chene>exit
<UNDEV1:1> (root)
/www/chene/app>

2) With command "/prsyslib/ksh/oraenv.pe" instead 
of ". /prsyslib/ksh/oraenv.pe"

/www/chene/app/lance_serveur_web.sh.pe
…
export ORAENV_ASK=NO
echo "je vais exécuter . oraenv"
/prsyslib/ksh/oraenv.pe
echo "j'ai exécuté . oraenv"
exit
       LIBPATH=$ORACLE_HOME/lib:$LIBPATH

/prsyslib/ksh/oraenv.pe
…
#####################################
echo "Je suis  dans oraenv point 01"
exit
case ${ORACLE_TRACE:-""} in
…

/home/chene>sudo /prsyslib/ksh/rc.chene.pe
cd /www/chene/app
/www/chene/app
ORASID          = [DCRE]
JAVA_HOME       = [/usr/java131]
PORT_HTTP       = [80]
PORT_INTERNE    = [8651]
je vais exécuter . oraenv
Je suis  dans oraenv point 01
j'ai exécuté . oraenv
<UNDEV1:1> (chene)
/home/chene>
Comment 1 Todd C. Miller 2005-06-22 21:21:56 MDT
User reported this is a problem with oracle, not sudo.