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
Tento commit je obsažen v:
@@ -9362,6 +9362,12 @@ static int __iw_set_band_config(struct net_device *dev,
|
|||||||
|
|
||||||
ENTER();
|
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]);
|
return hdd_set_band(dev, value[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Odkázat v novém úkolu
Zablokovat Uživatele