mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 08:54:28 -05:00
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
|
From be62ecde85228b91c66fb047e27d25132f56bd0d Mon Sep 17 00:00:00 2001
|
||
|
From: Mukul Sharma <mukul@qti.qualcomm.com>
|
||
|
Date: Wed, 28 Oct 2015 00:29:03 +0530
|
||
|
Subject: wlan:Check priviledge permission for QCSAP_IOCTL_DISASSOC_STA
|
||
|
|
||
|
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
|
||
|
---
|
||
|
CORE/HDD/src/wlan_hdd_hostapd.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
|
||
|
index 52402ff..9a96d5e 100644
|
||
|
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
|
||
|
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
|
||
|
@@ -4066,6 +4066,12 @@ static __iw_softap_disassoc_sta(struct net_device *dev,
|
||
|
|
||
|
ENTER();
|
||
|
|
||
|
+ if (!capable(CAP_NET_ADMIN)) {
|
||
|
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_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)
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|