diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-09-12 18:32:20 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-09-12 18:32:20 +0000 |
commit | edc0cf26d11d708320ade92e066d4f3e84e20112 (patch) | |
tree | 88abb6fc3997b9b090bebd2e1f04676086e8b24e | |
parent | 7d199962015ad042208beb54cf4a8fb72053f468 (diff) |
- stevesk@cvs.openbsd.org 2001/09/03 20:58:33
[readconf.c readconf.h ssh.c]
fatal() for nonexistent -Fssh_config. ok markus@
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | readconf.c | 9 | ||||
-rw-r--r-- | readconf.h | 4 | ||||
-rw-r--r-- | ssh.c | 10 |
4 files changed, 19 insertions, 13 deletions
@@ -75,8 +75,11 @@ | |||
75 | do not pass pointers to longjmp; fix from wayne@blorf.net | 75 | do not pass pointers to longjmp; fix from wayne@blorf.net |
76 | - markus@cvs.openbsd.org 2001/08/31 11:46:39 | 76 | - markus@cvs.openbsd.org 2001/08/31 11:46:39 |
77 | [sshconnect2.c] | 77 | [sshconnect2.c] |
78 | disable kbd-interactive if we don't get | 78 | disable kbd-interactive if we don't get SSH2_MSG_USERAUTH_INFO_REQUEST |
79 | SSH2_MSG_USERAUTH_INFO_REQUEST messages | 79 | messages |
80 | - stevesk@cvs.openbsd.org 2001/09/03 20:58:33 | ||
81 | [readconf.c readconf.h ssh.c] | ||
82 | fatal() for nonexistent -Fssh_config. ok markus@ | ||
80 | 83 | ||
81 | 20010815 | 84 | 20010815 |
82 | - (bal) Fixed stray code in readconf.c that went in by mistake. | 85 | - (bal) Fixed stray code in readconf.c that went in by mistake. |
@@ -6400,4 +6403,4 @@ | |||
6400 | - Wrote replacements for strlcpy and mkdtemp | 6403 | - Wrote replacements for strlcpy and mkdtemp |
6401 | - Released 1.0pre1 | 6404 | - Released 1.0pre1 |
6402 | 6405 | ||
6403 | $Id: ChangeLog,v 1.1507 2001/09/12 18:29:00 mouring Exp $ | 6406 | $Id: ChangeLog,v 1.1508 2001/09/12 18:32:20 mouring Exp $ |
diff --git a/readconf.c b/readconf.c index 04895be6d..6a426ae05 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: readconf.c,v 1.88 2001/08/30 16:04:35 stevesk Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.89 2001/09/03 20:58:33 stevesk Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -670,10 +670,10 @@ parse_int: | |||
670 | /* | 670 | /* |
671 | * Reads the config file and modifies the options accordingly. Options | 671 | * Reads the config file and modifies the options accordingly. Options |
672 | * should already be initialized before this call. This never returns if | 672 | * should already be initialized before this call. This never returns if |
673 | * there is an error. If the file does not exist, this returns immediately. | 673 | * there is an error. If the file does not exist, this returns 0. |
674 | */ | 674 | */ |
675 | 675 | ||
676 | void | 676 | int |
677 | read_config_file(const char *filename, const char *host, Options *options) | 677 | read_config_file(const char *filename, const char *host, Options *options) |
678 | { | 678 | { |
679 | FILE *f; | 679 | FILE *f; |
@@ -684,7 +684,7 @@ read_config_file(const char *filename, const char *host, Options *options) | |||
684 | /* Open the file. */ | 684 | /* Open the file. */ |
685 | f = fopen(filename, "r"); | 685 | f = fopen(filename, "r"); |
686 | if (!f) | 686 | if (!f) |
687 | return; | 687 | return 0; |
688 | 688 | ||
689 | debug("Reading configuration data %.200s", filename); | 689 | debug("Reading configuration data %.200s", filename); |
690 | 690 | ||
@@ -704,6 +704,7 @@ read_config_file(const char *filename, const char *host, Options *options) | |||
704 | if (bad_options > 0) | 704 | if (bad_options > 0) |
705 | fatal("%s: terminating, %d bad configuration options", | 705 | fatal("%s: terminating, %d bad configuration options", |
706 | filename, bad_options); | 706 | filename, bad_options); |
707 | return 1; | ||
707 | } | 708 | } |
708 | 709 | ||
709 | /* | 710 | /* |
diff --git a/readconf.h b/readconf.h index 802fd1908..faeef1dbf 100644 --- a/readconf.h +++ b/readconf.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: readconf.h,v 1.37 2001/08/01 22:03:33 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: readconf.h,v 1.38 2001/09/03 20:58:33 stevesk Exp $"); */ |
15 | 15 | ||
16 | #ifndef READCONF_H | 16 | #ifndef READCONF_H |
17 | #define READCONF_H | 17 | #define READCONF_H |
@@ -105,7 +105,7 @@ typedef struct { | |||
105 | 105 | ||
106 | void initialize_options(Options *); | 106 | void initialize_options(Options *); |
107 | void fill_default_options(Options *); | 107 | void fill_default_options(Options *); |
108 | void read_config_file(const char *, const char *, Options *); | 108 | int read_config_file(const char *, const char *, Options *); |
109 | 109 | ||
110 | int | 110 | int |
111 | process_config_line(Options *, const char *, char *, const char *, int, int *); | 111 | process_config_line(Options *, const char *, char *, const char *, int, int *); |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.141 2001/08/29 23:27:23 stevesk Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.142 2001/09/03 20:58:33 stevesk Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -622,14 +622,16 @@ again: | |||
622 | * file if the user specifies a config file on the command line. | 622 | * file if the user specifies a config file on the command line. |
623 | */ | 623 | */ |
624 | if (config != NULL) { | 624 | if (config != NULL) { |
625 | read_config_file(config, host, &options); | 625 | if (!read_config_file(config, host, &options)) |
626 | fatal("Can't open user config file %.100s: " | ||
627 | "%.100s", config, strerror(errno)); | ||
626 | } else { | 628 | } else { |
627 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, | 629 | snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, |
628 | _PATH_SSH_USER_CONFFILE); | 630 | _PATH_SSH_USER_CONFFILE); |
629 | 631 | ||
630 | /* Read systemwide configuration file. */ | 632 | /* Read systemwide configuration file. */ |
631 | read_config_file(_PATH_HOST_CONFIG_FILE, host, &options); | 633 | (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, &options); |
632 | read_config_file(buf, host, &options); | 634 | (void)read_config_file(buf, host, &options); |
633 | } | 635 | } |
634 | 636 | ||
635 | /* Fill configuration defaults. */ | 637 | /* Fill configuration defaults. */ |