summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorArtyom Poptsov <poptsov.artyom@gmail.com>2014-03-23 18:35:03 +0400
committerArtyom Poptsov <poptsov.artyom@gmail.com>2014-03-23 18:35:03 +0400
commit050c9b32479a78a75354ca1f86229bbdc4ce9068 (patch)
tree678fcc4fd876dc54753a2850383565dd6f1559dc /examples
parentexamples/: Improve error handling on `server-accept'. (diff)
downloadguile-ssh-050c9b32479a78a75354ca1f86229bbdc4ce9068.tar.gz
ssshd.scm.in (handle-req-auth): Handle password auth correctly.
* examples/ssshd.scm.in (handle-req-auth): Fix handling of password authentication.
Diffstat (limited to 'examples')
-rw-r--r--examples/ssshd.scm.in16
1 files changed, 3 insertions, 13 deletions
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.