summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-02-09 13:38:08 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-02-09 13:38:08 +0000
commitcd46854f300eb67b071cdb525482162f5e0e65f5 (patch)
treea9f47a377bba173ea26cb4f9b99f2c21849a9651
parente0df515b98e17249411a4ba417325f60adf7808e (diff)
reset options if no option is given; from han.holl@prismant.nl
-rw-r--r--usr.bin/ssh/auth-options.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/auth-options.c b/usr.bin/ssh/auth-options.c
index 04d2f085f62..57e335f3f19 100644
--- a/usr.bin/ssh/auth-options.c
+++ b/usr.bin/ssh/auth-options.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-options.c,v 1.12 2001/02/03 10:08:36 markus Exp $");
+RCSID("$OpenBSD: auth-options.c,v 1.13 2001/02/09 13:38:07 markus Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -61,12 +61,13 @@ int
auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
{
const char *cp;
- if (!opts)
- return 1;
/* reset options */
auth_clear_options();
+ if (!opts)
+ return 1;
+
while (*opts && *opts != ' ' && *opts != '\t') {
cp = "no-port-forwarding";
if (strncasecmp(opts, cp, strlen(cp)) == 0) {