[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

network-functions: mild annoyance, trivial patch?



I hope I'm posting to the correct list. Anyway, I'm using a encrypted
wireless network. Bringing eth0 (the wireless interface on my laptop) up
or down as a normal user would always gave me an error, either:

/sbin/ifup: line 48: keys-eth0: Permission denied

or:

/sbin/ifdown: line 48: keys-eth0: Permission denied

This error message would even "pop up" if I used the "Network Device
Control" GUI.

This was caused by line 48 in .../network-scripts/network-functions:

[ -f "keys-$DEVNAME" ] && . keys-$DEVNAME

"keys-$DEVNAME" probably expands to "keys-eth0" (on my laptop) and
access to .../network-scripts/keys-eth0 is set to 600 (rw-) for root, so
reading that file (e.g. with cat) as a normal user will generate a
"Permission denied" error.

Trivial patch: add "2>/dev/null" to line 48:

[ -f "keys-$DEVNAME" ] && . keys-$DEVNAME 2>/dev/null

Or would this trivial patch just hide a more serious problem?


Paul Bolle




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]