From 1d7637a05b888ed12940057b9268c5289755147a Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 27 Apr 2016 20:11:07 +0000 Subject: Update PermitRootLogin to accept without-password and prohibit-password (default) to match openssh 7 --- openssh-model.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssh-model.lua b/openssh-model.lua index 17b45be..7e8af51 100644 --- a/openssh-model.lua +++ b/openssh-model.lua @@ -70,7 +70,7 @@ function mymodule.read_config() local output = {} output.Port = cfe({ value=22, label="Port", seq=1 }) output.ListenAddress = cfe({ value="0.0.0.0", label="Listen address", seq=2 }) - output.PermitRootLogin = cfe({ type="boolean", value=true, label="Permit Root Login", seq=3 }) + output.PermitRootLogin = cfe({ type="select", value="prohibit-password", label="Permit Root Login", option={"yes", "no", "prohibit-password", "without-password"}, seq=3 }) output.PasswordAuthentication = cfe({ type="boolean", value=true, label="Password Authentication", seq=4 }) output.UseDNS = cfe({ type="boolean", value=false, label="Use DNS", seq=5 }) @@ -78,7 +78,7 @@ function mymodule.read_config() if config then output.Port.value = config.Port or output.Port.value output.ListenAddress.value = config.ListenAddress or output.ListenAddress.value - output.PermitRootLogin.value = not (config.PermitRootLogin == "no") + output.PermitRootLogin.value = config.PermitRootLogin or output.PermitRootLogin.value output.PasswordAuthentication.value = not (config.PasswordAuthentication == "no") output.UseDNS.value = (config.UseDNS == "yes") end -- cgit v1.2.3