]> andersk Git - gssapi-openssh.git/blobdiff - openssh/readconf.c
http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn13v6.diff.gz committe...
[gssapi-openssh.git] / openssh / readconf.c
index 484db3e5f82085cf8cf0597c43202d0995fa8bea..dc78c6f613617522d26b6660bcee6a7e7ac505a8 100644 (file)
@@ -132,6 +132,8 @@ typedef enum {
        oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
        oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
        oVisualHostKey, oZeroKnowledgePasswordAuthentication,
+       oNoneEnabled, oTcpRcvBufPoll, oTcpRcvBuf, oNoneSwitch, oHPNDisabled,
+       oHPNBufferSize,
        oDeprecated, oUnsupported
 } OpCodes;
 
@@ -243,6 +245,12 @@ static struct {
 #else
        { "zeroknowledgepasswordauthentication", oUnsupported },
 #endif
+       { "noneenabled", oNoneEnabled },
+       { "tcprcvbufpoll", oTcpRcvBufPoll },
+       { "tcprcvbuf", oTcpRcvBuf },
+       { "noneswitch", oNoneSwitch },
+       { "hpndisabled", oHPNDisabled },
+       { "hpnbuffersize", oHPNBufferSize },
 
        { NULL, oBadOption }
 };
@@ -490,6 +498,37 @@ parse_flag:
                intptr = &options->check_host_ip;
                goto parse_flag;
 
+       case oNoneEnabled:
+               intptr = &options->none_enabled;
+               goto parse_flag;
+       /* we check to see if the command comes from the */
+       /* command line or not. If it does then enable it */
+       /* otherwise fail. NONE should never be a default configuration */
+       case oNoneSwitch:
+               if(strcmp(filename,"command-line")==0)
+               {               
+                   intptr = &options->none_switch;
+                   goto parse_flag;
+               } else {
+                   error("NoneSwitch is found in %.200s.\nYou may only use this configuration option from the command line", filename);
+                   error("Continuing...");
+                   debug("NoneSwitch directive found in %.200s.", filename);
+                   return 0;
+               }
+
+       case oHPNDisabled:
+               intptr = &options->hpn_disabled;
+               goto parse_flag;
+
+       case oHPNBufferSize:
+               intptr = &options->hpn_buffer_size;
+               goto parse_int;
+
+       case oTcpRcvBufPoll:
+               intptr = &options->tcp_rcv_buf_poll;
+               goto parse_flag;
+
        case oVerifyHostKeyDNS:
                intptr = &options->verify_host_key_dns;
                goto parse_yesnoask;
@@ -668,6 +707,10 @@ parse_int:
                intptr = &options->connection_attempts;
                goto parse_int;
 
+       case oTcpRcvBuf:
+               intptr = &options->tcp_rcv_buf;
+               goto parse_int;
+
        case oCipher:
                intptr = &options->cipher;
                arg = strdelim(&s);
@@ -1094,6 +1137,12 @@ initialize_options(Options * options)
        options->permit_local_command = -1;
        options->visual_host_key = -1;
        options->zero_knowledge_password_authentication = -1;
+       options->none_switch = -1;
+       options->none_enabled = -1;
+       options->hpn_disabled = -1;
+       options->hpn_buffer_size = -1;
+       options->tcp_rcv_buf_poll = -1;
+       options->tcp_rcv_buf = -1;
 }
 
 /*
@@ -1222,6 +1271,29 @@ 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->hpn_disabled == -1)
+               options->hpn_disabled = 0;
+       if (options->hpn_buffer_size > -1)
+       {
+         /* if a user tries to set the size to 0 set it to 1KB */
+               if (options->hpn_buffer_size == 0)
+               options->hpn_buffer_size = 1024;
+               /*limit the buffer to 64MB*/
+               if (options->hpn_buffer_size > 65536)
+               {
+                       options->hpn_buffer_size = 65536*1024;
+                       debug("User requested buffer larger than 64MB. Request reverted to 64MB");
+               }
+               debug("hpn_buffer_size set to %d", options->hpn_buffer_size);
+       }
+       if (options->tcp_rcv_buf == 0)
+               options->tcp_rcv_buf = 1;
+       if (options->tcp_rcv_buf > -1) 
+               options->tcp_rcv_buf *=1024;
+       if (options->tcp_rcv_buf_poll == -1)
+               options->tcp_rcv_buf_poll = 1;
        if (options->control_master == -1)
                options->control_master = 0;
        if (options->hash_known_hosts == -1)
This page took 0.033756 seconds and 4 git commands to generate.