[Pkg-kde-extras] Bug#433061: encryption status does not work for unprivileged users
Kel Modderman
kel at otaku42.de
Sat Jul 14 05:30:59 UTC 2007
Package: knemo
Version: 0.4.6-2+b1
Severity: minor
knemo's two backends both use iwlib methods for determining if an encryption
key is being used for the current wireless link or not. Nettools uses it
indirectly by parsing iwconfig output and matching a regexp, while the Sys
backend basically borrows code from iwconfig.c of wireless-tools.
The iwlib method (from iwconfig.c) used to determine if an encryption key is
set on an iface is:
iw_get_ext(skfd, ifname, SIOCGIWENCODE, &wrq)
When run by an unprivileged user that will return -EPERM, and thus knemo's Sys
backend will fail to know that a key is in use, or iwconfig simply will not
display an "Encryption key:" field for the Nettools backend to match.
iwlist run as user is another good example of a user attempting to access
encryption key information, it uses the same method to access enc. key
information:
$ iwlist ath0 encryption
ath0 3 key sizes : 40, 104, 128bits
4 keys available :
Error reading wireless keys (SIOCGIWENCODE): Operation not permitted
As far as I can see, using the above the encryption status of knemo can never
be useful when knemo is run as regular user, it will always say encryption is
not in use.
For nettools backend, it could parse iwlist scan iformation for the current
ssid and match the "Encryption key:" field, but to do the same with system
calls strikes me as overly complex.
Thanks, Kel.
More information about the pkg-kde-extras
mailing list