diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-07-16 10:34:54 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-07-16 10:34:54 +0000 |
commit | c638b07c6bd31ef05d551080d0f7e0ff1ff515b5 (patch) | |
tree | ca8570e43138a94df7b740a0cd3d91d31e30ed2b | |
parent | 95259bbaffe9c57c50d5b326a0e5b6452cc6cc9c (diff) |
don't exit on multiple -v or -d; ok deraadt@
-rw-r--r-- | usr.bin/ssh/ssh.c | 12 | ||||
-rw-r--r-- | usr.bin/ssh/sshd.c | 10 |
2 files changed, 9 insertions, 13 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 58ae40bd8a4..921ab7d7afb 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.196 2003/07/03 08:09:06 djm Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.197 2003/07/16 10:34:53 markus Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -329,14 +329,14 @@ again: tty_flag = 1; break; case 'v': - if (0 == debug_flag) { + if (debug_flag == 0) { debug_flag = 1; options.log_level = SYSLOG_LEVEL_DEBUG1; - } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) { - options.log_level++; + } else { + if (options.log_level < SYSLOG_LEVEL_DEBUG3) + options.log_level++; break; - } else - fatal("Too high debugging level."); + } /* fallthrough */ case 'V': fprintf(stderr, diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 8e078015349..5bc655f9b96 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -42,7 +42,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.272 2003/07/14 12:36:37 markus Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.273 2003/07/16 10:34:53 markus Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -819,15 +819,11 @@ main(int ac, char **av) config_file_name = optarg; break; case 'd': - if (0 == debug_flag) { + if (debug_flag == 0) { debug_flag = 1; options.log_level = SYSLOG_LEVEL_DEBUG1; - } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) { + } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) options.log_level++; - } else { - fprintf(stderr, "Too high debugging level.\n"); - exit(1); - } break; case 'D': no_daemon_flag = 1; |