summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openssh-model.lua4
1 files 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