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)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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