]> andersk Git - gssapi-openssh.git/commitdiff
applied http://www.psc.edu/networking/projects/hpn-ssh/openssh-4.3p1-hpn11-none.diff... OPENSSH_4_3P2_HPN11
authorjbasney <jbasney>
Mon, 13 Feb 2006 19:39:06 +0000 (19:39 +0000)
committerjbasney <jbasney>
Mon, 13 Feb 2006 19:39:06 +0000 (19:39 +0000)
22 files changed:
openssh/buffer.c
openssh/buffer.h
openssh/channels.c
openssh/channels.h
openssh/cipher.c
openssh/compat.c
openssh/compat.h
openssh/kex.c
openssh/kex.h
openssh/myproposal.h
openssh/packet.c
openssh/packet.h
openssh/readconf.c
openssh/readconf.h
openssh/scp.c
openssh/serverloop.c
openssh/sftp.c
openssh/ssh.c
openssh/sshconnect.c
openssh/sshconnect2.c
openssh/sshd.c
openssh/version.h

index 487e0810598a29a3211a647b561b46acc5009841..83e388178a769b7c64d740602061e700b7323ffa 100644 (file)
@@ -107,7 +107,7 @@ restart:
        /* Increase the size of the buffer and retry. */
 
        newlen = buffer->alloc + len + 32768;
-       if (newlen > BUFFER_MAX_LEN)
+       if (newlen > BUFFER_MAX_HPN_LEN)
                fatal("buffer_append_space: alloc %u not supported",
                    newlen);
        buffer->buf = xrealloc(buffer->buf, newlen);
index 2b20eed52acf29e6c68c1d47fbd6e17384f058bd..634b2727b4e7d1310da41747d22056fe84495f42 100644 (file)
@@ -25,6 +25,7 @@ typedef struct {
 
 #define        BUFFER_MAX_CHUNK        0x100000
 #define        BUFFER_MAX_LEN          0xa00000
+#define BUFFER_MAX_HPN_LEN     (2<<29)-1
 
 void    buffer_init(Buffer *);
 void    buffer_clear(Buffer *);
index 1252f344673b8e4efb39dc25b7aa4638e8d1633b..b7f36d0f52cb0b9419681142f7e60e9e6cae6995 100644 (file)
@@ -288,6 +288,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
        c->local_window_max = window;
        c->local_consumed = 0;
        c->local_maxpacket = maxpack;
+       c->dynamic_window = 0;
        c->remote_id = -1;
        c->remote_name = xstrdup(remote_name);
        c->remote_window = 0;
@@ -748,9 +749,9 @@ static void
 channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset)
 {
        u_int limit = compat20 ? c->remote_window : packet_get_maxsize();
-
+       
        /* check buffer limits */
-       limit = MIN(limit, (BUFFER_MAX_LEN - BUFFER_MAX_CHUNK - CHAN_RBUF));
+       limit = MIN(limit, (BUFFER_MAX_HPN_LEN - BUFFER_MAX_CHUNK - CHAN_RBUF));
 
        if (c->istate == CHAN_INPUT_OPEN &&
            limit > 0 &&
@@ -1615,14 +1616,29 @@ channel_check_window(Channel *c)
            !(c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD)) &&
            c->local_window < c->local_window_max/2 &&
            c->local_consumed > 0) {
+               u_int32_t tcpwinsz = 0;
+               socklen_t optsz = sizeof(tcpwinsz);
+               int ret = -1;
+               u_int32_t addition = 0;
+               if (c->dynamic_window) {
+                       ret = getsockopt(packet_get_connection_in(), 
+                               SOL_SOCKET, SO_RCVBUF, &tcpwinsz, &optsz);
+                       if ((ret == 0) && tcpwinsz > BUFFER_MAX_HPN_LEN) 
+                               tcpwinsz = BUFFER_MAX_HPN_LEN;
+               }
+               if (c->dynamic_window && (ret == 0) && 
+                   (tcpwinsz > c->local_window_max)) {
+                       addition = tcpwinsz - c->local_window_max;
+                       c->local_window_max += addition;
+               }
                packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
                packet_put_int(c->remote_id);
-               packet_put_int(c->local_consumed);
+               packet_put_int(c->local_consumed + addition);
                packet_send();
                debug2("channel %d: window %d sent adjust %d",
                    c->self, c->local_window,
                    c->local_consumed);
-               c->local_window += c->local_consumed;
+               c->local_window += c->local_consumed + addition;
                c->local_consumed = 0;
        }
        return 1;
index a97dd90071292fc6b8a6943033c78ae0d836dcce..3f4b7885f8ff8c72bee31522c5eebe50588788ef 100644 (file)
@@ -100,6 +100,7 @@ struct Channel {
        u_int   local_window_max;
        u_int   local_consumed;
        u_int   local_maxpacket;
+       int     dynamic_window;
        int     extended_usage;
        int     single_connection;
 
@@ -124,11 +125,11 @@ struct Channel {
 
 /* default window/packet sizes for tcp/x11-fwd-channel */
 #define CHAN_SES_PACKET_DEFAULT        (32*1024)
-#define CHAN_SES_WINDOW_DEFAULT        (4*CHAN_SES_PACKET_DEFAULT)
+#define CHAN_SES_WINDOW_DEFAULT        (0xa00000/2)
 #define CHAN_TCP_PACKET_DEFAULT        (32*1024)
-#define CHAN_TCP_WINDOW_DEFAULT        (4*CHAN_TCP_PACKET_DEFAULT)
+#define CHAN_TCP_WINDOW_DEFAULT        (0xa00000/2)
 #define CHAN_X11_PACKET_DEFAULT        (16*1024)
-#define CHAN_X11_WINDOW_DEFAULT        (4*CHAN_X11_PACKET_DEFAULT)
+#define CHAN_X11_WINDOW_DEFAULT        (0xa00000/2)
 
 /* possible input states */
 #define CHAN_INPUT_OPEN                        0
index 1434d5524029a7743f93319c384c3f6c6c426961..570bfd262b46553cbcca900823ece91b84df1433 100644 (file)
@@ -151,7 +151,8 @@ ciphers_valid(const char *names)
        for ((p = strsep(&cp, CIPHER_SEP)); p && *p != '\0';
            (p = strsep(&cp, CIPHER_SEP))) {
                c = cipher_by_name(p);
-               if (c == NULL || c->number != SSH_CIPHER_SSH2) {
+               if (c == NULL || (c->number != SSH_CIPHER_SSH2 && 
+c->number != SSH_CIPHER_NONE)) {
                        debug("bad cipher %s [%s]", p, names);
                        xfree(cipher_list);
                        return 0;
@@ -325,6 +326,7 @@ cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len)
        int evplen;
 
        switch (c->number) {
+       case SSH_CIPHER_NONE:
        case SSH_CIPHER_SSH2:
        case SSH_CIPHER_DES:
        case SSH_CIPHER_BLOWFISH:
@@ -359,6 +361,7 @@ cipher_set_keyiv(CipherContext *cc, u_char *iv)
        int evplen = 0;
 
        switch (c->number) {
+       case SSH_CIPHER_NONE:
        case SSH_CIPHER_SSH2:
        case SSH_CIPHER_DES:
        case SSH_CIPHER_BLOWFISH:
index 4086e853ed6e48bb8b5973709620261a5ebc808e..a331014111343a8f004255657523df9e172ea14b 100644 (file)
@@ -162,6 +162,14 @@ compat_datafellows(const char *version)
                    strlen(check[i].pat), 0) == 1) {
                        debug("match: %s pat %s", version, check[i].pat);
                        datafellows = check[i].bugs;
+                       /* Check to see if the remote side is OpenSSH and not HPN */
+                       if(strstr(version,"OpenSSH") != NULL)
+                       {
+                               if (strstr(version,"hpn") == NULL)
+                               {
+                                       datafellows |= SSH_BUG_LARGEWINDOW;
+                               }
+                       }
                        return;
                }
        }
index cf92dbdeefcc04b558f6c75f4328c39985014a96..9c0f0625386471adada3f0c8795ff1bb71a5ead1 100644 (file)
@@ -56,6 +56,7 @@
 #define SSH_BUG_PROBE          0x00400000
 #define SSH_BUG_FIRSTKEX       0x00800000
 #define SSH_OLD_FORWARD_ADDR   0x01000000
+#define SSH_BUG_LARGEWINDOW     0x02000000
 
 void     enable_compat13(void);
 void     enable_compat20(void);
index cd71be9ca778aeca26a3dff0e6bdf4f5b8ac9ff2..45985f5e7fcded56b172134e9e0e95c55f174058 100644 (file)
@@ -49,7 +49,7 @@ static void kex_kexinit_finish(Kex *);
 static void kex_choose_conf(Kex *);
 
 /* put algorithm proposal into buffer */
-static void
+void
 kex_prop2buf(Buffer *b, char *proposal[PROPOSAL_MAX])
 {
        u_int i;
index bbd931e049df7ad068f6ca77739a9ff34165ade2..474ba52da8728815abc4fd024c5b6bd541406b80 100644 (file)
@@ -123,6 +123,8 @@ struct Kex {
        void    (*kex[KEX_MAX])(Kex *);
 };
 
+void kex_prop2buf(Buffer *, char *proposal[PROPOSAL_MAX]);
+
 Kex    *kex_setup(char *[PROPOSAL_MAX]);
 void    kex_finish(Kex *);
 
index d8cba1caf818fc7da272781561a90399668ad2fd..969045994cea346c133dd20c94b346c2d5101482 100644 (file)
@@ -31,7 +31,7 @@
        "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
        "arcfour128,arcfour256,arcfour," \
        "aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se," \
-       "aes128-ctr,aes192-ctr,aes256-ctr"
+       "aes128-ctr,aes192-ctr,aes256-ctr,none"
 #define        KEX_DEFAULT_MAC \
        "hmac-md5,hmac-sha1,hmac-ripemd160," \
        "hmac-ripemd160@openssh.com," \
index db2aa24119d184496bb128bcc7baea62d185910d..ee81f686e2a6d53025f520a1456cc886149b07e2 100644 (file)
@@ -1546,6 +1546,13 @@ packet_send_ignore(int nbytes)
                rnd >>= 8;
        }
 }
+int rekey_requested = 0;
+
+void
+packet_request_rekeying(void)
+{
+       rekey_requested = 1;
+}
 
 #define MAX_PACKETS    (1U<<31)
 int
@@ -1553,6 +1560,11 @@ packet_need_rekeying(void)
 {
        if (datafellows & SSH_BUG_NOREKEY)
                return 0;
+       if (rekey_requested == 1)
+       {
+               rekey_requested = 0;
+               return 1;
+       }
        return
            (p_send.packets > MAX_PACKETS) ||
            (p_read.packets > MAX_PACKETS) ||
index 8c23646aaae45c84c1bcdaa3f722254b66631e08..3b711cdf61ef9691894f04cb508a5a72752ac2d3 100644 (file)
@@ -18,6 +18,9 @@
 
 #include <openssl/bn.h>
 
+void
+packet_request_rekeying(void);
+
 void     packet_set_connection(int, int);
 void     packet_set_nonblocking(void);
 int      packet_get_connection_in(void);
index 1fbf597936d84e8b795889aeec733c92ba50eb90..9458891ae3b0b46113e76ba069ad355ae5d3a62f 100644 (file)
@@ -1016,6 +1016,7 @@ initialize_options(Options * options)
        options->verify_host_key_dns = -1;
        options->server_alive_interval = -1;
        options->server_alive_count_max = -1;
+       options->none_switch = -1;
        options->num_send_env = 0;
        options->control_path = NULL;
        options->control_master = -1;
@@ -1145,6 +1146,8 @@ fill_default_options(Options * options)
                options->server_alive_interval = 0;
        if (options->server_alive_count_max == -1)
                options->server_alive_count_max = 3;
+       if (options->none_switch == -1)
+               options->none_switch = 0;
        if (options->control_master == -1)
                options->control_master = 0;
        if (options->hash_known_hosts == -1)
index 4565b2c2cedabd42cc95334be089295a45368135..08134b6e2f1e30775b8e7638dd813d6f76459955 100644 (file)
@@ -57,6 +57,7 @@ typedef struct {
        int     compression_level;      /* Compression level 1 (fast) to 9
                                         * (best). */
        int     tcp_keep_alive; /* Set SO_KEEPALIVE. */
+        int     tcp_rcv_buf; /* user switch to set tcp recv buffer */
        LogLevel log_level;     /* Level for logging. */
 
        int     port;           /* Port to connect. */
@@ -102,6 +103,7 @@ typedef struct {
 
        int     enable_ssh_keysign;
        int     rekey_limit;
+       int     none_switch;
        int     no_host_authentication_for_localhost;
        int     identities_only;
        int     server_alive_interval;
index 620024ea78a38ff14363a8a32f46e979bf6f2537..b1779ede9443f87c3a2affd0a7cf68783a3a69fe 100644 (file)
@@ -278,7 +278,7 @@ main(int argc, char **argv)
        addargs(&args, "-oClearAllForwardings yes");
 
        fflag = tflag = 0;
-       while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246S:o:F:")) != -1)
+       while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246zS:o:F:R:")) != -1)
                switch (ch) {
                /* User-visible flags. */
                case '1':
@@ -286,6 +286,7 @@ main(int argc, char **argv)
                case '4':
                case '6':
                case 'C':
+               case 'z':       
                        addargs(&args, "-%c", ch);
                        break;
                case 'o':
@@ -339,6 +340,9 @@ main(int argc, char **argv)
                        setmode(0, O_BINARY);
 #endif
                        break;
+               case 'R':
+                 addargs(&args, "-r%s", optarg);
+                 break;
                default:
                        usage();
                }
@@ -553,7 +557,7 @@ source(int argc, char **argv)
        off_t i, amt, statbytes;
        size_t result;
        int fd = -1, haderr, indx;
-       char *last, *name, buf[2048];
+       char *last, *name, buf[16384];
        int len;
 
        for (indx = 0; indx < argc; ++indx) {
@@ -780,7 +784,7 @@ sink(int argc, char **argv)
        int amt, exists, first, mask, mode, ofd, omode;
        off_t size, statbytes;
        int setimes, targisdir, wrerrno = 0;
-       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];
+       char ch, *cp, *np, *targ, *why, *vect[1], buf[16384];
        struct timeval tv[2];
 
 #define        atime   tv[0]
@@ -941,7 +945,7 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                        continue;
                }
                (void) atomicio(vwrite, remout, "", 1);
-               if ((bp = allocbuf(&buffer, ofd, 4096)) == NULL) {
+               if ((bp = allocbuf(&buffer, ofd, sizeof(buf))) == NULL) {
                        (void) close(ofd);
                        continue;
                }
@@ -951,8 +955,8 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                statbytes = 0;
                if (showprogress)
                        start_progress_meter(curfile, size, &statbytes);
-               for (count = i = 0; i < size; i += 4096) {
-                       amt = 4096;
+               for (count = i = 0; i < size; i += sizeof(buf)) {
+                       amt = sizeof(buf);
                        if (i + amt > size)
                                amt = size - i;
                        count += amt;
@@ -969,7 +973,7 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                        } while (amt > 0);
 
                        if (limit_rate)
-                               bwlimit(4096);
+                               bwlimit(sizeof(buf));
 
                        if (count == bp->cnt) {
                                /* Keep reading so we stay sync'd up. */
@@ -1085,7 +1089,7 @@ usage(void)
 {
        (void) fprintf(stderr,
            "usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]\n"
-           "           [-l limit] [-o ssh_option] [-P port] [-S program]\n"
+           "           [-l limit] [-o ssh_option] [-P port] [-R Receive buffer size (Kb)] [-S program]\n"
            "           [[user@]host1:]file1 [...] [[user@]host2:]file2\n");
        exit(1);
 }
index 3d8e7cfb5a5c81e5d226bdb6fd95b0c7ea99bec8..b60932f0d0f8fe6798da0db1519b1d8eb4e6828a 100644 (file)
@@ -975,6 +975,8 @@ server_request_session(void)
        c = channel_new("session", SSH_CHANNEL_LARVAL,
            -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT,
            0, "server-session", 1);
+       if (!(datafellows & SSH_BUG_LARGEWINDOW))
+               c->dynamic_window = 1;
        if (session_open(the_authctxt, c->self) != 1) {
                debug("session open failed, free channel %d", c->self);
                channel_free(c);
index a2e3f6aad65f36fcd3e7e2ed79c3e2dbd6596419..56a69221427c1ba7151231a9ecffc929c7a1422f 100644 (file)
@@ -1464,7 +1464,7 @@ main(int argc, char **argv)
        ll = SYSLOG_LEVEL_INFO;
        infile = stdin;
 
-       while ((ch = getopt(argc, argv, "1hvCo:s:S:b:B:F:P:R:")) != -1) {
+       while ((ch = getopt(argc, argv, "1hvCo:s:S:b:B:F:P:R:z")) != -1) {
                switch (ch) {
                case 'C':
                        addargs(&args, "-C");
@@ -1519,6 +1519,9 @@ main(int argc, char **argv)
                                    optarg);
                        break;
                case 'h':
+                case 'z':       
+                        addargs(&args, "-%c", ch);
+                        break;
                default:
                        usage();
                }
index 3940dabfd716a79393ab83cf7aa79b856c4899df..16e2fe0e2db7586a7a77de1cd964a6850d790e9c 100644 (file)
@@ -157,12 +157,13 @@ static void
 usage(void)
 {
        fprintf(stderr,
-"usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]\n"
+"usage: ssh [-1246AaCfgkMNnqrsTtVvXxY] [-b bind_address] [-c cipher_spec]\n"
 "           [-D [bind_address:]port] [-e escape_char] [-F configfile]\n"
 "           [-i identity_file] [-L [bind_address:]port:host:hostport]\n"
 "           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n"
 "           [-R [bind_address:]port:host:hostport] [-S ctl_path]\n"
 "           [-w tunnel:tunnel] [user@]hostname [command]\n"
+"           [-r Receive Buffer Size in K]\n"
        );
        exit(255);
 }
@@ -241,10 +242,12 @@ main(int ac, char **av)
 
        /* Parse command-line arguments. */
        host = NULL;
+       /* need to set options.tcp_rcv_buf to 0 */
+       options.tcp_rcv_buf = 0;
 
 again:
        while ((opt = getopt(ac, av,
-           "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:MNO:PR:S:TVw:XY")) != -1) {
+           "1246ab:c:e:fgi:kl:m:no:p:qrstvxACD:F:I:L:MNO:PR:S:TVw:XYz")) != -1) {
                switch (opt) {
                case '1':
                        options.protocol = SSH_PROTO_1;
@@ -472,6 +475,7 @@ again:
                        break;
                case 'T':
                        no_tty_flag = 1;
+                       options.none_switch = 0;
                        break;
                case 'o':
                        dummy = 1;
@@ -495,6 +499,17 @@ again:
                case 'F':
                        config = optarg;
                        break;
+               case 'r':
+                       options.tcp_rcv_buf = atoi(optarg) * 1024;
+                       break;
+               case 'z':
+                       /* make sure we can't turn on the none_switch */
+                       /* if they try to force a no tty flag on a tty session */
+                       if (!no_tty_flag) {
+                               options.none_switch = 1;
+                       }
+                       break;
+
                default:
                        usage();
                }
@@ -1130,6 +1145,7 @@ ssh_session2_open(void)
        window = CHAN_SES_WINDOW_DEFAULT;
        packetmax = CHAN_SES_PACKET_DEFAULT;
        if (tty_flag) {
+               window = 4*CHAN_SES_PACKET_DEFAULT;
                window >>= 1;
                packetmax >>= 1;
        }
@@ -1137,7 +1153,9 @@ ssh_session2_open(void)
            "session", SSH_CHANNEL_OPENING, in, out, err,
            window, packetmax, CHAN_EXTENDED_WRITE,
            "client-session", /*nonblock*/0);
-
+       if (!tty_flag && (!(datafellows & SSH_BUG_LARGEWINDOW))) {
+               c->dynamic_window = 1;
+       }
        debug3("ssh_session2_open: channel_new: %d", c->self);
 
        channel_send_open(c->self);
index 64ffec240c1606f05ccd9c12e671d7b1f7499d2b..711d693a684281df502a062bebd2ce1057f754e3 100644 (file)
@@ -166,13 +166,58 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
                            strerror(errno));
                else
                        debug("Allocated local port %d.", p);
+
+               
+               /* tuning needs to happen after the socket is */
+               /* created but before the connection happens */
+               /* so winscale is negotiated properly -cjr */
+               
+               /* Set tcp receive buffer if requested */
+               if (options.tcp_rcv_buf) 
+                 {
+                   if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, 
+                                  (void *)&options.tcp_rcv_buf, 
+                                  sizeof(options.tcp_rcv_buf)) >= 0)
+                     {             
+                       debug("setsockopt SO_RCVBUF: %.100s", strerror(errno));
+                     } 
+                   else 
+                     {
+                       /* coudln't set the socket size to use spec. */
+                       /* should default to system param and continue */
+                       /* warn the user though - cjr */
+                       error("Couldn't set socket receive buffer as requested. Continuing anyway.");
+                     }
+                 }
                return sock;
        }
        sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
        if (sock < 0)
                error("socket: %.100s", strerror(errno));
-
-       /* Bind the socket to an alternative local IP address */
+       
+       /* tuning needs to happen after the socket is */
+       /* created but before the connection happens */
+       /* so winscale is negotiated properly -cjr */
+       
+       /* Set tcp receive buffer if requested */
+       if (options.tcp_rcv_buf) 
+         {
+           if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, 
+                          (void *)&options.tcp_rcv_buf, 
+                          sizeof(options.tcp_rcv_buf)) >= 0)
+             {             
+               debug("setsockopt SO_RCVBUF: %.100s", strerror(errno));
+             }
+           else 
+             {
+               /* coudln't set the socket size to use spec. */
+               /* should default to system param and continue */
+               /* warn the user though - cjr */
+               error("Couldn't set socket receive buffer as requested. Continuing anyway.");
+             }
+         }
+       
+               /* Bind the socket to an alternative local IP address */
        if (options.bind_address == NULL)
                return sock;
 
@@ -479,7 +524,7 @@ ssh_exchange_identification(void)
        snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n",
            compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
            compat20 ? PROTOCOL_MINOR_2 : minor1,
-           SSH_VERSION);
+           SSH_RELEASE);
        if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf))
                fatal("write: %.100s", strerror(errno));
        client_version_string = xstrdup(buf);
index adf96728194483d5709cf552ad26583de6b97b89..c806bb46bb3609e161d35645328ce5ff9da4f51f 100644 (file)
@@ -58,6 +58,12 @@ RCSID("$OpenBSD: sshconnect2.c,v 1.143 2005/10/14 02:17:59 stevesk Exp $");
 extern char *client_version_string;
 extern char *server_version_string;
 extern Options options;
+extern Kex *xxx_kex;
+
+/* tty_flag is set in ssh.c. use this in ssh_userauth2 */
+/* if it is set then prevent the switch to the null cipher */
+
+extern int tty_flag;
 
 /*
  * SSH2 key exchange
@@ -309,7 +315,15 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
 
        pubkey_cleanup(&authctxt);
        dispatch_range(SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL);
-
+       if ((options.none_switch == 1) && !tty_flag) /* no null on tty sessions */
+       {
+               debug("Requesting none rekeying...");
+               myproposal[PROPOSAL_ENC_ALGS_STOC] = "none";
+               myproposal[PROPOSAL_ENC_ALGS_CTOS] = "none";
+               kex_prop2buf(&xxx_kex->my,myproposal);
+               packet_request_rekeying();
+               fprintf(stderr, "WARNING: ENABLED NULL CIPHER\n");
+       }
        debug("Authentication succeeded (%s).", authctxt.method->name);
 }
 
index def90d827a2b34ef465f5db723e007ea979f464c..9b5f73f097511768bbbbe72a475ef0aa82c503a8 100644 (file)
@@ -377,7 +377,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
                major = PROTOCOL_MAJOR_1;
                minor = PROTOCOL_MINOR_1;
        }
-       snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION);
+       snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_RELEASE);
        server_version_string = xstrdup(buf);
 
        /* Send our protocol version identification. */
index d5fd0c6ce6886d5d14ef29026e272667b4663a63..5e451c66f5cd1ec97c22d8224635aa9853c7a58f 100644 (file)
@@ -3,4 +3,5 @@
 #define SSH_VERSION    "OpenSSH_4.3"
 
 #define SSH_PORTABLE   "p2"
-#define SSH_RELEASE    SSH_VERSION SSH_PORTABLE
+#define SSH_HPN                "-hpn"
+#define SSH_RELEASE    SSH_VERSION SSH_PORTABLE SSH_HPN
This page took 0.102756 seconds and 5 git commands to generate.