rfkill: do not allow userspace to override ALL RADIOS OFF
commit2ce489c0cecc381bdddd9c2f3764c144b4f1e892
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Thu, 9 Oct 2008 18:10:49 +0000 (9 15:10 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Thu, 9 Oct 2008 18:10:49 +0000 (9 15:10 -0300)
treecc89b40424bedfcc458512a11ebd497cdad7aad1
parente4cdaa8af5856b91962272c66e5f3bc1db8ddf5e
rfkill: do not allow userspace to override ALL RADIOS OFF

SW_RFKILL_ALL is the "emergency power-off all radios" input event.  It must
be handled, and must always do the same thing as far as the rfkill system
is concerned: all transmitters are to go *immediately* offline.

For safety, do NOT allow userspace to override EV_SW SW_RFKILL_ALL OFF.  As
long as rfkill-input is loaded, that event will *always* be processed, and
it will *always* force all rfkill switches to disable all wireless
transmitters, regardless of user_claim attribute or anything else.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
net/rfkill/rfkill-input.c
net/rfkill/rfkill-input.h
net/rfkill/rfkill.c