mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/hostapd: allow octothorpe characters in SAE password
The `saePasswordsFile` option mentions that lines beginning with `#` are ignored, however the current regexp ignores all lines with `#` located anywhere in the line. In order to better fit the documentation, the regexp has been changed to only allow `#` at the beginning of the line, with optional whitespace.
This commit is contained in:
parent
c598fc0ca3
commit
027e77778c
1 changed files with 2 additions and 2 deletions
|
@ -1001,7 +1001,7 @@ in {
|
|||
"20-addMacAllowFromSaeFile" = mkIf (bssCfg.authentication.saeAddToMacAllow && bssCfg.authentication.saePasswordsFile != null) (pkgs.writeShellScript "add-mac-allow-from-sae-file" ''
|
||||
MAC_ALLOW_FILE=$2
|
||||
grep mac= ${escapeShellArg bssCfg.authentication.saePasswordsFile} \
|
||||
| grep -v '\s*#' \
|
||||
| grep -v '^\s*#' \
|
||||
| grep -Eo 'mac=([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})' \
|
||||
| sed 's|^mac=||' >> "$MAC_ALLOW_FILE"
|
||||
'');
|
||||
|
@ -1025,7 +1025,7 @@ in {
|
|||
# Add sae passwords from file
|
||||
"20-saePasswordsFile" = mkIf (bssCfg.authentication.saePasswordsFile != null) (pkgs.writeShellScript "sae-passwords-file" ''
|
||||
HOSTAPD_CONFIG_FILE=$1
|
||||
grep -v '\s*#' ${escapeShellArg bssCfg.authentication.saePasswordsFile} \
|
||||
grep -v '^\s*#' ${escapeShellArg bssCfg.authentication.saePasswordsFile} \
|
||||
| sed 's/^/sae_password=/' >> "$HOSTAPD_CONFIG_FILE"
|
||||
'');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue