]> andersk Git - openssh.git/blobdiff - readconf.c
- (djm) Fix rsh path in RPMs. Report from Jason L Tibbitts III
[openssh.git] / readconf.c
index fdbd1e7d91db0129b75f21ec70c22441a89eb327..cbcc927c75d60e2a257591dd56dc2cf5e62678e5 100644 (file)
@@ -92,7 +92,7 @@ typedef enum {
        oBadOption,
        oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication,
        oPasswordAuthentication, oRSAAuthentication, oFallBackToRsh, oUseRsh,
-       oSkeyAuthentication,
+       oSkeyAuthentication, oXAuthLocation,
 #ifdef KRB4
        oKerberosAuthentication,
 #endif /* KRB4 */
@@ -116,6 +116,7 @@ static struct {
 } keywords[] = {
        { "forwardagent", oForwardAgent },
        { "forwardx11", oForwardX11 },
+       { "xauthlocation", oXAuthLocation },
        { "gatewayports", oGatewayPorts },
        { "useprivilegedport", oUsePrivilegedPort },
        { "rhostsauthentication", oRhostsAuthentication },
@@ -396,6 +397,10 @@ parse_flag:
                }
                break;
 
+       case oXAuthLocation:
+               charptr=&options->xauth_location;
+               goto parse_string;
+
        case oUser:
                charptr = &options->user;
 parse_string:
@@ -464,6 +469,8 @@ parse_int:
        case oCipher:
                intptr = &options->cipher;
                cp = strtok(NULL, WHITESPACE);
+               if (!cp)
+                       fatal("%.200s line %d: Missing argument.", filename, linenum);
                value = cipher_number(cp);
                if (value == -1)
                        fatal("%.200s line %d: Bad cipher '%s'.",
@@ -474,8 +481,10 @@ parse_int:
 
        case oCiphers:
                cp = strtok(NULL, WHITESPACE);
+               if (!cp)
+                       fatal("%.200s line %d: Missing argument.", filename, linenum);
                if (!ciphers_valid(cp))
-                       fatal("%.200s line %d: Bad cipher spec '%s'.",
+                       fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.",
                              filename, linenum, cp ? cp : "<NONE>");
                if (*activep && options->ciphers == NULL)
                        options->ciphers = xstrdup(cp);
@@ -484,6 +493,8 @@ parse_int:
        case oProtocol:
                intptr = &options->protocol;
                cp = strtok(NULL, WHITESPACE);
+               if (!cp)
+                       fatal("%.200s line %d: Missing argument.", filename, linenum);
                value = proto_spec(cp);
                if (value == SSH_PROTO_UNKNOWN)
                        fatal("%.200s line %d: Bad protocol spec '%s'.",
@@ -638,6 +649,7 @@ initialize_options(Options * options)
        memset(options, 'X', sizeof(*options));
        options->forward_agent = -1;
        options->forward_x11 = -1;
+       options->xauth_location = NULL;
        options->gateway_ports = -1;
        options->use_privileged_port = -1;
        options->rhosts_authentication = -1;
@@ -691,9 +703,13 @@ void
 fill_default_options(Options * options)
 {
        if (options->forward_agent == -1)
-               options->forward_agent = 1;
+               options->forward_agent = 0;
        if (options->forward_x11 == -1)
                options->forward_x11 = 0;
+#ifdef XAUTH_PATH
+       if (options->xauth_location == NULL)
+               options->xauth_location = XAUTH_PATH;
+#endif /* XAUTH_PATH */
        if (options->gateway_ports == -1)
                options->gateway_ports = 0;
        if (options->use_privileged_port == -1)
@@ -745,6 +761,7 @@ fill_default_options(Options * options)
        /* Selected in ssh_login(). */
        if (options->cipher == -1)
                options->cipher = SSH_CIPHER_NOT_SET;
+       /* options->ciphers, default set in myproposals.h */
        if (options->protocol == SSH_PROTO_UNKNOWN)
                options->protocol = SSH_PROTO_1|SSH_PROTO_2|SSH_PROTO_1_PREFERRED;
        if (options->num_identity_files == 0) {
This page took 0.164805 seconds and 4 git commands to generate.