Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!arclight.uoregon.edu!nntp.primenet.com!nntp.uio.no!nntp.zit.th-darmstadt.de!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: pppd ip-up and ip-down problem Date: 3 Nov 1996 23:02:12 GMT Organization: Private BSD site, Dresden Lines: 52 Message-ID: <55j89k$123@uriah.heep.sax.de> References: <327540CA.3640@soncom.com> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.6 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Pat Sonnek <psonnek@soncom.com> wrote: > -rwsr-xr-x 1 root bin 251 Oct 4 20:21 pppdlog > #!/bin/sh That's useless. Shell scripts do not run setuid. (Be happy about this... it's for good [security] reason.) > dport=`tty | awk -F / '{print $3}'` > if [ "$dport" = "cuaa1" ] > then > /usr/sbin/pppd passive 206.9.159.17:206.9.159.18 57600 > fi > if [ "$dport" = "cuaa2" ] > then > /usr/sbin/pppd passive 206.9.159.17:206.9.159.19 57600 > fi Try #!/usr/bin/suidperl $ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin"; chop($tty = `tty`); $tty =~ s|^/dev/||; $ip = "206.9.159.17:206.9.159." . ($tty eq "cuaa1"? "18": "19"); exec "pppd", "passive", $ip, "57600"; > #!/bin/sh > logger ip-up running Try a id | logger here. > > /sbin/route -n delete $5 > /sbin/route -n delete -host $5 > /sbin/route -n add -iface $5 $5 > /sbin/route -n change -iface $5 $5 -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)