From c0bc3815ac6044dfe3f587c34d581dc74087a10e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 01:49:11 -0400 Subject: fix ssh config --- Property/Ssh.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Property') diff --git a/Property/Ssh.hs b/Property/Ssh.hs index c5902d94..3883606b 100644 --- a/Property/Ssh.hs +++ b/Property/Ssh.hs @@ -18,11 +18,12 @@ sshdConfig = "/etc/ssh/sshd_config" setSshdConfig :: String -> Bool -> Property setSshdConfig setting allowed = combineProperties desc - [ lineNotInFile sshdConfig (setting ++ sshBool (not allowed)) - , lineInFile sshdConfig (setting ++ sshBool allowed) + [ lineNotInFile sshdConfig $ sshLine (not allowed) + , lineInFile sshdConfig $ sshLine allowed ] `onChange` restartSshd where desc = unwords [ "ssh config:", setting, sshBool allowed ] + sshline v = setting ++ " " ++ sshBool v permitRootLogin :: Bool -> Property permitRootLogin = setSshdConfig "PermitRootLogin" -- cgit v1.2.3