mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Check privilege permission for QCSAP_IOCTL_DISASSOC_STA
qcacld-2.0 to qcacld-3.0 propagation Kernel assumes all SET IOCTL commands are assigned with even numbers. But in our WLAN driver, some SET IOCTLS are assigned with odd numbers. This leads kernel fail to check, for some SET IOCTLs, whether user has the right permission to do SET operation. Hence, in driver, before processing QCSAP_IOCTL_DISASSOC_STA IOCTL, making sure user task has right permission to process the command. Change-Id: I00919a56e93b8b49bce7a314b50f9f48039fbe6f CRs-Fixed: 930946
This commit is contained in:
parent
9f4dcdc973
commit
b2468a0c90
1 changed files with 6 additions and 0 deletions
|
|
@ -3379,6 +3379,12 @@ static __iw_softap_disassoc_sta(struct net_device *dev,
|
|||
|
||||
ENTER();
|
||||
|
||||
if (!capable(CAP_NET_ADMIN)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("permission check failed"));
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue