summaryrefslogtreecommitdiffstats
path: root/openssh-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'openssh-model.lua')
-rw-r--r--openssh-model.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/openssh-model.lua b/openssh-model.lua
index acd89fd..f460c0e 100644
--- a/openssh-model.lua
+++ b/openssh-model.lua
@@ -334,4 +334,18 @@ function mymodule.create_auth(self, authstr)
return authstr
end
+function mymodule.get_logfile(self, clientdata)
+ local retval = cfe({ type="group", value={}, label="Log File Configuration" })
+ retval.value.facility = cfe({value="auth", label="Syslog Facility"})
+ retval.value.grep = cfe({ value="sshd", label="Grep" })
+
+ local config = format.parse_configfile(fs.read_file(configfile) or "")
+ if config then
+ if config.SyslogFacility then
+ retval.value.facility.value = config.SyslogFacility:lower()
+ end
+ end
+ return retval
+end
+
return mymodule