]> andersk Git - openssh.git/blobdiff - readconf.c
- miod@cvs.openbsd.org 2003/09/18 13:02:21
[openssh.git] / readconf.c
index 2a77ea14fd9eaecfa83a083b5f1470de64e54f10..13987ffa7046f8c5895d043f695fc9fa0cbece5b 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.121 2003/09/01 18:15:50 markus Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -57,7 +57,6 @@ RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $");
    Host fascist.blob.com
      Port 23123
      User tylonen
-     RhostsAuthentication no
      PasswordAuthentication no
 
    Host puukko.hut.fi
@@ -75,7 +74,6 @@ RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $");
    Host *
      ForwardAgent no
      ForwardX11 no
-     RhostsAuthentication yes
      PasswordAuthentication yes
      RSAAuthentication yes
      RhostsRSAAuthentication yes
@@ -91,10 +89,9 @@ RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $");
 
 typedef enum {
        oBadOption,
-       oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication,
+       oForwardAgent, oForwardX11, oGatewayPorts,
        oPasswordAuthentication, oRSAAuthentication,
        oChallengeResponseAuthentication, oXAuthLocation,
-       oKerberosAuthentication, oKerberosTgtPassing, oAFSTokenPassing,
        oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
        oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
        oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
@@ -107,7 +104,7 @@ typedef enum {
        oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
        oClearAllForwardings, oNoHostAuthenticationForLocalhost,
        oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
-       oAddressFamily,
+       oAddressFamily, oGssAuthentication, oGssDelegateCreds,
        oDeprecated, oUnsupported
 } OpCodes;
 
@@ -122,7 +119,7 @@ static struct {
        { "xauthlocation", oXAuthLocation },
        { "gatewayports", oGatewayPorts },
        { "useprivilegedport", oUsePrivilegedPort },
-       { "rhostsauthentication", oRhostsAuthentication },
+       { "rhostsauthentication", oDeprecated },
        { "passwordauthentication", oPasswordAuthentication },
        { "kbdinteractiveauthentication", oKbdInteractiveAuthentication },
        { "kbdinteractivedevices", oKbdInteractiveDevices },
@@ -134,17 +131,15 @@ static struct {
        { "challengeresponseauthentication", oChallengeResponseAuthentication },
        { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */
        { "tisauthentication", oChallengeResponseAuthentication },  /* alias */
-#if defined(KRB4) || defined(KRB5)
-       { "kerberosauthentication", oKerberosAuthentication },
-       { "kerberostgtpassing", oKerberosTgtPassing },
-#else
        { "kerberosauthentication", oUnsupported },
        { "kerberostgtpassing", oUnsupported },
-#endif
-#if defined(AFS)
-       { "afstokenpassing", oAFSTokenPassing },
-#else
        { "afstokenpassing", oUnsupported },
+#if defined(GSSAPI)
+       { "gssapiauthentication", oGssAuthentication },
+       { "gssapidelegatecredentials", oGssDelegateCreds },
+#else
+       { "gssapiauthentication", oUnsupported },
+       { "gssapidelegatecredentials", oUnsupported },
 #endif
        { "fallbacktorsh", oDeprecated },
        { "usersh", oDeprecated },
@@ -288,7 +283,6 @@ process_config_line(Options *options, const char *host,
        size_t len;
        u_short fwd_port, fwd_host_port;
        char sfwd_host_port[6];
-       extern int IPv4or6;
 
        /* Strip trailing whitespace */
        for(len = strlen(line) - 1; len > 0; len--) {
@@ -356,10 +350,6 @@ parse_flag:
                intptr = &options->use_privileged_port;
                goto parse_flag;
 
-       case oRhostsAuthentication:
-               intptr = &options->rhosts_authentication;
-               goto parse_flag;
-
        case oPasswordAuthentication:
                intptr = &options->password_authentication;
                goto parse_flag;
@@ -392,16 +382,12 @@ parse_flag:
                intptr = &options->challenge_response_authentication;
                goto parse_flag;
 
-       case oKerberosAuthentication:
-               intptr = &options->kerberos_authentication;
+       case oGssAuthentication:
+               intptr = &options->gss_authentication;
                goto parse_flag;
 
-       case oKerberosTgtPassing:
-               intptr = &options->kerberos_tgt_passing;
-               goto parse_flag;
-
-       case oAFSTokenPassing:
-               intptr = &options->afs_token_passing;
+       case oGssDelegateCreds:
+               intptr = &options->gss_deleg_creds;
                goto parse_flag;
 
        case oBatchMode:
@@ -546,6 +532,8 @@ parse_string:
                goto parse_string;
 
        case oProxyCommand:
+               if (s == NULL)
+                       fatal("%.200s line %d: Missing argument.", filename, linenum);
                charptr = &options->proxy_command;
                len = strspn(s, WHITESPACE "=");
                if (*activep && *charptr == NULL)
@@ -683,7 +671,7 @@ parse_int:
                        fatal("%.200s line %d: Badly formatted port number.",
                            filename, linenum);
                if (*activep)
-                       add_local_forward(options, fwd_port, "socks4", 0);
+                       add_local_forward(options, fwd_port, "socks", 0);
                break;
 
        case oClearAllForwardings:
@@ -725,14 +713,17 @@ parse_int:
 
        case oAddressFamily:
                arg = strdelim(&s);
+               intptr = &options->address_family;
                if (strcasecmp(arg, "inet") == 0)
-                       IPv4or6 = AF_INET;
+                       value = AF_INET;
                else if (strcasecmp(arg, "inet6") == 0)
-                       IPv4or6 = AF_INET6;
+                       value = AF_INET6;
                else if (strcasecmp(arg, "any") == 0)
-                       IPv4or6 = AF_UNSPEC;
+                       value = AF_UNSPEC;
                else
                        fatal("Unsupported AddressFamily \"%s\"", arg);
+               if (*activep && *intptr == -1)
+                       *intptr = value;
                break;
 
        case oEnableSSHKeysign:
@@ -818,13 +809,11 @@ initialize_options(Options * options)
        options->xauth_location = NULL;
        options->gateway_ports = -1;
        options->use_privileged_port = -1;
-       options->rhosts_authentication = -1;
        options->rsa_authentication = -1;
        options->pubkey_authentication = -1;
        options->challenge_response_authentication = -1;
-       options->kerberos_authentication = -1;
-       options->kerberos_tgt_passing = -1;
-       options->afs_token_passing = -1;
+       options->gss_authentication = -1;
+       options->gss_deleg_creds = -1;
        options->password_authentication = -1;
        options->kbd_interactive_authentication = -1;
        options->kbd_interactive_devices = NULL;
@@ -837,6 +826,7 @@ initialize_options(Options * options)
        options->keepalives = -1;
        options->compression_level = -1;
        options->port = -1;
+       options->address_family = -1;
        options->connection_attempts = -1;
        options->connection_timeout = -1;
        options->number_of_password_prompts = -1;
@@ -888,20 +878,16 @@ fill_default_options(Options * options)
                options->gateway_ports = 0;
        if (options->use_privileged_port == -1)
                options->use_privileged_port = 0;
-       if (options->rhosts_authentication == -1)
-               options->rhosts_authentication = 0;
        if (options->rsa_authentication == -1)
                options->rsa_authentication = 1;
        if (options->pubkey_authentication == -1)
                options->pubkey_authentication = 1;
        if (options->challenge_response_authentication == -1)
                options->challenge_response_authentication = 1;
-       if (options->kerberos_authentication == -1)
-               options->kerberos_authentication = 1;
-       if (options->kerberos_tgt_passing == -1)
-               options->kerberos_tgt_passing = 1;
-       if (options->afs_token_passing == -1)
-               options->afs_token_passing = 1;
+       if (options->gss_authentication == -1)
+               options->gss_authentication = 1;
+       if (options->gss_deleg_creds == -1)
+               options->gss_deleg_creds = 0;
        if (options->password_authentication == -1)
                options->password_authentication = 1;
        if (options->kbd_interactive_authentication == -1)
@@ -924,6 +910,8 @@ fill_default_options(Options * options)
                options->compression_level = 6;
        if (options->port == -1)
                options->port = 0;      /* Filled in ssh_connect. */
+       if (options->address_family == -1)
+               options->address_family = AF_UNSPEC;
        if (options->connection_attempts == -1)
                options->connection_attempts = 1;
        if (options->number_of_password_prompts == -1)
This page took 0.050085 seconds and 4 git commands to generate.