forked from mirrors/nixpkgs
wpa_supplicant: review fixes
This commit is contained in:
parent
08ced9d67f
commit
84670bf681
|
@ -3,7 +3,7 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
package = if cfg.allowDeclarativeAndImperativeNetworks
|
||||
package = if cfg.allowAuxiliaryImperativeNetworks
|
||||
then pkgs.wpa_supplicant_ro_ssids
|
||||
else pkgs.wpa_supplicant;
|
||||
|
||||
|
@ -51,7 +51,7 @@ in {
|
|||
description = "Force a specific wpa_supplicant driver.";
|
||||
};
|
||||
|
||||
allowDeclarativeAndImperativeNetworks = mkEnableOption "support for imperative & declarative networks" // {
|
||||
allowAuxiliaryImperativeNetworks = mkEnableOption "support for imperative & declarative networks" // {
|
||||
description = ''
|
||||
Whether to allow configuring networks "imperatively" (e.g. via
|
||||
<package>wpa_supplicant_gui</package>) and declaratively via
|
||||
|
@ -247,7 +247,7 @@ in {
|
|||
path = [ package ];
|
||||
|
||||
script = let
|
||||
configStr = if cfg.allowDeclarativeAndImperativeNetworks
|
||||
configStr = if cfg.allowAuxiliaryImperativeNetworks
|
||||
then "-c /etc/wpa_supplicant.conf -I ${configFile}"
|
||||
else "-c ${configFile}";
|
||||
in ''
|
||||
|
|
|
@ -56,7 +56,7 @@ index 77c326df5..d5ed051b9 100644
|
|||
|
||||
for (ssid = config->ssid; ssid; ssid = ssid->next) {
|
||||
- if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary)
|
||||
+ if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary || ssid->ro == 1)
|
||||
+ if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary || ssid->ro)
|
||||
continue; /* do not save temporary networks */
|
||||
if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt) && !ssid->psk_set &&
|
||||
!ssid->passphrase)
|
||||
|
|
Loading…
Reference in a new issue