Changeset 2588 for pykota/trunk/bin

Show
Ignore:
Timestamp:
11/24/05 15:14:53 (18 years ago)
Author:
jerome
Message:

Now regain priviledges before running an external mailto directive,
because smbstatus can't be run setuid (smbstatus is used by mailandpopup.sh)

Location:
pykota/trunk/bin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r2584 r2588  
    804804            if mailto == "EXTERNAL" : 
    805805                # TODO : clean this again 
     806                self.regainPriv() 
    806807                self.externalMailTo(arguments, self.Action, self.User, self.Printer, self.Reason) 
     808                self.dropPriv() 
    807809            else :     
    808810                # TODO : clean this again 
  • pykota/trunk/bin/mailandpopup.sh

    r2146 r2588  
    4242# we must also supply the IP address. This will use smbstatus to get all IPs 
    4343# where the user is logged in and send the message there: 
    44 IPS=`smbstatus -b -u $UNAME | grep '(' | cut -d'(' -f 2 | cut -d')' -f 1` 
    45 for i in $IPS; do 
    46     echo $UTF8MESSAGE | smbclient -M "$UNAME" -I $i 2>&1 >/dev/null; 
     44IPS=`smbstatus -b -u "$UNAME" | grep "$UNAME" | cut -d '(' -f 2,2 | cut -d ')' -f 1,1` 
     45for i in $IPS ; do 
     46    echo "$UTF8MESSAGE" | smbclient -M "$UNAME" -I $i 2>&1 ; 
    4747done