=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- src/usr.bin/ssh/ssh.c 1999/10/28 21:29:26 1.26 +++ src/usr.bin/ssh/ssh.c 1999/11/10 23:36:44 1.27 @@ -18,7 +18,7 @@ */ #include "includes.h" -RCSID("$Id: ssh.c,v 1.26 1999/10/28 21:29:26 markus Exp $"); +RCSID("$Id: ssh.c,v 1.27 1999/11/10 23:36:44 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -32,9 +32,6 @@ command line. */ int debug_flag = 0; -/* Flag indicating whether quiet mode is on. */ -int quiet_flag = 0; - /* Flag indicating whether to allocate a pseudo tty. This can be set on the command line, and is automatically set if no command is given on the command line. */ @@ -306,16 +303,17 @@ case 'v': case 'V': - debug_flag = 1; fprintf(stderr, "SSH Version %s, protocol version %d.%d.\n", SSH_VERSION, PROTOCOL_MAJOR, PROTOCOL_MINOR); fprintf(stderr, "Compiled with SSL.\n"); if (opt == 'V') exit(0); + debug_flag = 1; + options.log_level = SYSLOG_LEVEL_DEBUG; break; case 'q': - quiet_flag = 1; + options.log_level = SYSLOG_LEVEL_QUIET; break; case 'e': @@ -466,7 +464,7 @@ /* Initialize "log" output. Since we are the client all output actually goes to the terminal. */ - log_init(av[0], 1, debug_flag, quiet_flag, SYSLOG_FACILITY_USER); + log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 0); /* Read per-user configuration file. */ snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, SSH_USER_CONFFILE); @@ -477,6 +475,10 @@ /* Fill configuration defaults. */ fill_default_options(&options); + + /* reinit */ + log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 0); + if (options.user == NULL) options.user = xstrdup(pw->pw_name);