mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Check priviledge permission for SET_BAND_CONFIG IOCTL
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 SET_BAND_CONFIG IOCTL, making sure user task has right permission to process the command. Change-Id: Ie8a36bfa07a7b21601364b27b3c4bc888a6a5b4e CRs-Fixed: 930952
This commit is contained in:
parent
535fc9960d
commit
711b9fa512
1 changed files with 6 additions and 0 deletions
|
|
@ -9362,6 +9362,12 @@ static int __iw_set_band_config(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;
|
||||
}
|
||||
|
||||
return hdd_set_band(dev, value[0]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue