From 8ebfce0eda627ffa739e16279ac543f4d50cd60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 26 Nov 2016 11:18:01 +0100 Subject: [PATCH] display-managers module: improve variable quoting Fixes #20713, though I'm certain nixpkgs contains loads of places without proper quoting, as (ba)sh unfortunately encourages that. The only plus side is that most of such problems in nixpkgs aren't actually security problems but mere annoyance to those who are foolish enough to use "weird" characters in critical names. --- nixos/modules/services/x11/display-managers/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index ce82af4ca68..c8a1a2361f7 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -82,12 +82,12 @@ let # Speed up application start by 50-150ms according to # http://kdemonkey.blogspot.nl/2008/04/magic-trick.html - rm -rf $HOME/.compose-cache - mkdir $HOME/.compose-cache + rm -rf "$HOME/.compose-cache" + mkdir "$HOME/.compose-cache" # Work around KDE errors when a user first logs in and # .local/share doesn't exist yet. - mkdir -p $HOME/.local/share + mkdir -p "$HOME/.local/share" unset _DID_SYSTEMD_CAT @@ -148,7 +148,7 @@ let allowSubstitutes = false; } '' - mkdir -p $out + mkdir -p "$out" ${concatMapStrings (n: '' cat - > "$out/${n}.desktop" << EODESKTOP [Desktop Entry]