Start work on SERVICE_REQUEST.

This commit is contained in:
Tony Garnock-Jones 2011-10-23 21:26:13 -04:00
parent 7de4c802f1
commit 282d3671ad
2 changed files with 20 additions and 7 deletions

View File

@ -28,7 +28,8 @@
(struct-out ssh-msg-unimplemented)
(struct-out ssh-msg-newkeys)
(struct-out ssh-msg-debug)
(struct-out ssh-msg-ignore))
(struct-out ssh-msg-ignore)
(struct-out ssh-msg-service-request))
(struct ssh-msg () #:transparent)
@ -229,3 +230,6 @@
(define-ssh-message-type ssh-msg-ignore SSH_MSG_IGNORE
(string data))
(define-ssh-message-type ssh-msg-service-request SSH_MSG_SERVICE_REQUEST
(string service-name))

View File

@ -422,17 +422,26 @@
c2s-enc s2c-enc
c2s-mac s2c-mac
c2s-zip s2c-zip))
(struct-copy connection conn
[rekey-state
(rekey-in-seconds-or-bytes
(rekey-interval)
(rekey-volume)
(connection-total-transferred conn))]))))
(set-handlers (struct-copy connection conn
[rekey-state
(rekey-in-seconds-or-bytes
(rekey-interval)
(rekey-volume)
(connection-total-transferred conn))])
SSH_MSG_SERVICE_REQUEST handle-msg-service-request))))
(if should-discard-first-kex-packet
(struct-copy connection (continue-after-discard conn) [discard-next-packet? #t])
(continue-after-discard conn)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Service request manager
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (handle-msg-service-request packet message conn)
(disconnect-with-error SSH_DISCONNECT_SERVICE_NOT_AVAILABLE
"%%%"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Session main loop
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;