Record failed usernames

This commit is contained in:
niten 2022-02-01 13:26:32 -06:00
parent d2df49be7e
commit 31468f6bb7
1 changed files with 4 additions and 3 deletions

View File

@ -8,12 +8,12 @@
(define *host-passwd-file* (getenv "FUDO_HOST_PASSWD_FILE"))
(when (not *host-passwd-file*)
(format (current-error-port "FUDO_HOST_PASSWD_FILE not set~%"))
(format #t (current-error-port "FUDO_HOST_PASSWD_FILE not set~%"))
(exit 1))
(define *service-passwd-file* (getenv "FUDO_SERVICE_PASSWD_FILE"))
(when (not *service-passwd-file*)
(format (current-error-port "FUDO_SERVICE_PASSWD_FILE not set~%"))
(format #t (current-error-port "FUDO_SERVICE_PASSWD_FILE not set~%"))
(exit 1))
(define host-regex "^host-([a-zA-Z][a-zA-Z0-9_-]+)$")
@ -35,7 +35,8 @@
(service-verifier (match:substring (string-match service-regex username) 1)
password))
(else #f))))
(else (begin (format #t "unrecognized username: ~s @ ~s~%" username hostname)
nil)))))
(define (make-handler handlers)
(lambda (request)