we have information here not available in the access log, especially
if the /api2/extjs formatter is used, which encapsulates errors in a
200 response.
So keep the auth log for now, but extend it use from create ticket
calls to all authentication failures for API calls, this ensures one
can also fail2ban tokens.
Do that logging in a central place, which makes it simple but means
that we do not have the user ID information available to include in
the log.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Anyone with a PAM account and Sys.Console access could have started a
termproxy session, adapt the regex.
Always test for broken entries and run the sed expression to make sure
eventually all occurences of the broken syntax are fixed.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
At the time when we can fix this up the new (and possibly an old)
server daemon process is running, so use the flock CLI tool from
util-linux to ensure we do the same locking as the server and thus we
avoid a race condition.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>