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.
*/
#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"
/*
* 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;
/* Open the file. */
f = fopen(filename, "r");
if (!f)
- return;
+ return 0;
debug("Reading configuration data %.200s", filename);
if (bad_options > 0)
fatal("%s: terminating, %d bad configuration options",
filename, bad_options);
+ return 1;
}
/*
* 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
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 *);
*/
#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>
* 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. */