summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-05-01 00:59:18 +0200
committerGitHub <noreply@github.com>2021-05-01 00:59:18 +0200
commit095912d50dc2a4f2031a8c1d704a686a5572f0a2 (patch)
treeab29a9f9dc5c128c0c9594d1c2e42567b2f02950
parent9184721fab65934fe016c132a8f11a2308742f92 (diff)
parentbe8d749599a11229435141d85cfe5eba2dcf96d2 (diff)
Merge pull request #4925 from ja-pa/luci-login-syslog
luci-base: allow direct syslog login for perror
-rw-r--r--modules/luci-base/luasrc/dispatcher.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index 44c17c85f8..2f965b16a8 100644
--- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -563,15 +563,13 @@ local function session_setup(user, pass)
ubus_rpc_session = login.ubus_rpc_session,
values = { token = sys.uniqueid(16) }
})
-
- io.stderr:write("luci: accepted login on /%s for %s from %s\n"
- %{ rp, user or "?", http.getenv("REMOTE_ADDR") or "?" })
+ nixio.syslog("info", tostring("luci: accepted login on /%s for %s from %s\n"
+ %{ rp, user or "?", http.getenv("REMOTE_ADDR") or "?" }))
return session_retrieve(login.ubus_rpc_session)
end
-
- io.stderr:write("luci: failed login on /%s for %s from %s\n"
- %{ rp, user or "?", http.getenv("REMOTE_ADDR") or "?" })
+ nixio.syslog("info", tostring("luci: failed login on /%s for %s from %s\n"
+ %{ rp, user or "?", http.getenv("REMOTE_ADDR") or "?" }))
end
local function check_authentication(method)