Bug 77

Summary: Trap and sudo
Product: Sudo Reporter: jose.pinto
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: high CC: jose.pinto
Priority: high    
Version: 1.6.5   
Hardware: HP   
OS: HP-UX   

Description jose.pinto 2002-04-15 05:03:47 MDT
I have a  shell script with :
#########################################
...
trap "" 2
...
...
nohup /opt/sudo/bin/sudo -u confmngr $OCMS_TOOL/ckout.pl $HOME $LOGNAME
....

#########################################

The problem is:

If we want control my process with trap instruction, it not works properly with
sudo.



When I execute my script and if I press ctrl c, the processing of ckout.pl not
stop, but some instructions inside the ckout.pl script are stopped.
Imagine, my ckout.pl script do for example the following instructions:

...print "hello \n";
...chmod(000,file2);
...print "end";

And if i press ctrl c immediately the starting of the first print (because
print is not a only one instructions in assembler), and stop press it only
after chmod start, the ckout.pl process not stop and the instruction print
hello and chmod are not perform. But the last operation could be performed.
Comment 1 Todd C. Miller 2002-12-13 11:23:51 MST
This will be fixed in the next version of sudo.