]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: Allow privileged operations from user namespaces
authorMartin Willi <martin@strongswan.org>
Mon, 9 May 2016 16:33:58 +0000 (18:33 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 31 May 2016 09:36:34 +0000 (11:36 +0200)
commit25e42282cdcb6434a3cbecbc63a60eea95f4f085
tree3cdfff2de392894a71c72c5fd5477bba44ce80ed
parenteba76c55007ff595254adb661a014c02bf2cb89e
nl80211: Allow privileged operations from user namespaces

While a wiphy can be transferred to network namespaces, a process having
CAP_NET_ADMIN in a non-initial user namespace can not administrate such
devices due to the genetlink GENL_ADMIN_PERM restrictions.

For openvswitch having the same issue, a new GENL_UNS_ADMIN_PERM flag has
been introduced, commit 08b874d1b0ef ("openvswitch: allow management from
inside user namespaces"). This patch changes all privileged operations
operating on a wiphy, dev or wdev to allow their administration using the
same mechanism. All operations use either NEED_WIPHY, NEED_WDEV or
NEED_NETDEV, which implies a namespace aware lookup of the device. The only
exception is NL80211_CMD_SET_WIPHY, which explicitly uses a namespace aware
phy lookup.

Signed-off-by: Martin Willi <martin@strongswan.org>
[also allow cancel scan, for completeness]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c