diff options
author | Ted Trask <ttrask01@yahoo.com> | 2017-03-01 01:24:12 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2017-03-01 01:24:12 +0000 |
commit | c1bf1823f2eb60f741e0c9312b20f080874fb315 (patch) | |
tree | 12e8ac7adaf61b99bbc5d09177ceb6bce72a1ec1 /openssh-model.lua | |
parent | 6fa2ceb72724f1534c0830449e4d194533641367 (diff) | |
download | acf-openssh-c1bf1823f2eb60f741e0c9312b20f080874fb315.tar.bz2 acf-openssh-c1bf1823f2eb60f741e0c9312b20f080874fb315.tar.xz |
Add logfile action
Diffstat (limited to 'openssh-model.lua')
-rw-r--r-- | openssh-model.lua | 14 |
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 |