On Mon, Jun 04, 2001 at 04:26:59PM -0700, Tom Rini wrote: > > On Mon, Jun 04, 2001 at 03:01:52PM -0800, Ethan Benson wrote: > > On Mon, Jun 04, 2001 at 12:07:44PM -0700, Tom Rini wrote: > > > Here's what I do, which is slightly more verisitle: > > > sleep) > > > if [ "`lsmod | grep airport 2>/dev/null`" ]; then > > > AIRPORT=`cat /proc/net/wireless | grep eth | sed 's/^ //' | cut -d : -f 1` > > > ifdown $AIRPORT > > > echo $AIRPORT > /var/tmp/airport > > > > you deserve a serious lart for suggesting something so hideously > > insecure. > > :P > You're correct of course, but I'd wager it's unlikely to happen. Is this never assume anything like that when it comes to security ;-) remember /var/tmp is world writable. > better? : > if ["`lsmod ... `"]; then > tempfile -n /var/run/airport || { > $logger -p daemon.error -t pwrctl "$0: cannot create tempfile" > exit 1 > } > AIRPORT=`..` > ... > fi yes much better. -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgpIdFONA1AAg.pgp
Description: PGP signature