]> andersk Git - gssapi-openssh.git/blobdiff - openssh/ssh.c
release new patch today
[gssapi-openssh.git] / openssh / ssh.c
index 4b7065566d56e3a7f39679baffda138c6b3ae0f6..f1121341c3a24a4a7906dd4361d0eb4d7d5c56c6 100644 (file)
@@ -617,6 +617,29 @@ main(int ac, char **av)
                        fatal("Can't open user config file %.100s: "
                            "%.100s", config, strerror(errno));
        } else {
+           /*
+            * Since the config file parsing code aborts if it sees
+            * options it doesn't recognize, allow users to put
+            * options specific to compile-time add-ons in alternate
+            * config files so their primary config file will
+            * interoperate SSH versions that don't support those
+            * options.
+            */
+#ifdef GSSAPI
+               snprintf(buf, sizeof buf, "%.100s/%.100s.gssapi", pw->pw_dir,
+                   _PATH_SSH_USER_CONFFILE);
+               (void)read_config_file(buf, host, &options, 1);
+#ifdef GSI
+               snprintf(buf, sizeof buf, "%.100s/%.100s.gsi", pw->pw_dir,
+                   _PATH_SSH_USER_CONFFILE);
+               (void)read_config_file(buf, host, &options, 1);
+#endif
+#if defined(KRB5)
+               snprintf(buf, sizeof buf, "%.100s/%.100s.krb", pw->pw_dir,
+                   _PATH_SSH_USER_CONFFILE);
+               (void)read_config_file(buf, host, &options, 1);
+#endif
+#endif
                snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
                    _PATH_SSH_USER_CONFFILE);
                (void)read_config_file(buf, host, &options, 1);
@@ -636,8 +659,11 @@ main(int ac, char **av)
 
        seed_rng();
 
-       if (options.user == NULL)
+       if (options.user == NULL) {
                options.user = xstrdup(pw->pw_name);
+               options.implicit = 1;
+       }
+        else options.implicit = 0;
 
        /* Get default port if port has not been set. */
        if (options.port == 0) {
This page took 0.042072 seconds and 4 git commands to generate.