]> andersk Git - openssh.git/commitdiff
- stevesk@cvs.openbsd.org 2001/09/03 20:58:33
authormouring <mouring>
Wed, 12 Sep 2001 18:32:20 +0000 (18:32 +0000)
committermouring <mouring>
Wed, 12 Sep 2001 18:32:20 +0000 (18:32 +0000)
     [readconf.c readconf.h ssh.c]
     fatal() for nonexistent -Fssh_config. ok markus@

ChangeLog
readconf.c
readconf.h
ssh.c

index 8182235571bb7b4be6cff37e1b496a9370379a7e..a2f70668d3192bf93ea49ee4daa4d3084bfcd741 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      do not pass pointers to longjmp; fix from wayne@blorf.net
    - markus@cvs.openbsd.org 2001/08/31 11:46:39
      [sshconnect2.c]
-     disable kbd-interactive if we don't get 
-     SSH2_MSG_USERAUTH_INFO_REQUEST messages
+     disable kbd-interactive if we don't get SSH2_MSG_USERAUTH_INFO_REQUEST
+     messages
+   - stevesk@cvs.openbsd.org 2001/09/03 20:58:33
+     [readconf.c readconf.h ssh.c]
+     fatal() for nonexistent -Fssh_config. ok markus@
 
 20010815
  - (bal) Fixed stray code in readconf.c that went in by mistake.
index 04895be6d881e931c76d720cd25ddc54a09d2431..6a426ae050872b7eca03813740133e70f29f3ca3 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.88 2001/08/30 16:04:35 stevesk Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.89 2001/09/03 20:58:33 stevesk Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -670,10 +670,10 @@ parse_int:
 /*
  * Reads the config file and modifies the options accordingly.  Options
  * should already be initialized before this call.  This never returns if
- * there is an error.  If the file does not exist, this returns immediately.
+ * there is an error.  If the file does not exist, this returns 0.
  */
 
-void
+int
 read_config_file(const char *filename, const char *host, Options *options)
 {
        FILE *f;
@@ -684,7 +684,7 @@ read_config_file(const char *filename, const char *host, Options *options)
        /* Open the file. */
        f = fopen(filename, "r");
        if (!f)
-               return;
+               return 0;
 
        debug("Reading configuration data %.200s", filename);
 
@@ -704,6 +704,7 @@ read_config_file(const char *filename, const char *host, Options *options)
        if (bad_options > 0)
                fatal("%s: terminating, %d bad configuration options",
                      filename, bad_options);
+       return 1;
 }
 
 /*
index 802fd1908a2a64313124b84f1458ad419011f646..faeef1dbfba31a37dc26eea8e1d4ea71878285a1 100644 (file)
@@ -11,7 +11,7 @@
  * called by a name other than "ssh" or "Secure Shell".
  */
 
-/* RCSID("$OpenBSD: readconf.h,v 1.37 2001/08/01 22:03:33 markus Exp $"); */
+/* RCSID("$OpenBSD: readconf.h,v 1.38 2001/09/03 20:58:33 stevesk Exp $"); */
 
 #ifndef READCONF_H
 #define READCONF_H
@@ -105,7 +105,7 @@ typedef struct {
 
 void     initialize_options(Options *);
 void     fill_default_options(Options *);
-void    read_config_file(const char *, const char *, Options *);
+int     read_config_file(const char *, const char *, Options *);
 
 int
 process_config_line(Options *, const char *, char *, const char *, int, int *);
diff --git a/ssh.c b/ssh.c
index d500e8493f1b6c703d98fcf17b5c1d25b9c1d24f..9ccd9d8f19b7f00475eaa342be753aee6ff9428f 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.141 2001/08/29 23:27:23 stevesk Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.142 2001/09/03 20:58:33 stevesk Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -622,14 +622,16 @@ again:
         * file if the user specifies a config file on the command line.
         */
        if (config != NULL) {
-               read_config_file(config, host, &options);
+               if (!read_config_file(config, host, &options))
+                       fatal("Can't open user config file %.100s: "
+                           "%.100s", config, strerror(errno));
        } else  {
                snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
                    _PATH_SSH_USER_CONFFILE);
 
                /* Read systemwide configuration file. */
-               read_config_file(_PATH_HOST_CONFIG_FILE, host, &options);
-               read_config_file(buf, host, &options);
+               (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, &options);
+               (void)read_config_file(buf, host, &options);
        }
 
        /* Fill configuration defaults. */
This page took 0.159178 seconds and 5 git commands to generate.