From 050c9b32479a78a75354ca1f86229bbdc4ce9068 Mon Sep 17 00:00:00 2001 From: Artyom Poptsov Date: Sun, 23 Mar 2014 18:35:03 +0400 Subject: ssshd.scm.in (handle-req-auth): Handle password auth correctly. * examples/ssshd.scm.in (handle-req-auth): Fix handling of password authentication. --- examples/ssshd.scm.in | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'examples') diff --git a/examples/ssshd.scm.in b/examples/ssshd.scm.in index 5685b07..0c595d7 100644 --- a/examples/ssshd.scm.in +++ b/examples/ssshd.scm.in @@ -119,22 +119,12 @@ (user (auth-req:user req)) (pswd (auth-req:password req))) - (newline) - (display req) - (newline) - (format #t " User ~a wants to authenticate with a password~%" user) - ;; Check the password for the user. - (case (userauth-password! session pswd) - ((success) - (message-reply-success msg #f)) - - ((partial) - (message-reply-success msg #t)) + (if (string=? pswd "guile") + (message-reply-success msg) + (message-reply-default msg)))) - (else - (message-reply-default msg))))) ;; To enable authentication through the "none" method, we have ;; to call `message-auth-reply-success' procedure. -- cgit v1.2.3