[ssh.c]
     Avoid setting optind to 0 as GNU getopt treats that like we do optreset.
     markus@ OK
This commit is contained in:
Ben Lindstrom 2002-12-23 02:24:54 +00:00
parent d576781829
commit b9fa691819
2 changed files with 9 additions and 6 deletions

View File

@ -51,6 +51,10 @@
- djm@cvs.openbsd.org 2002/12/06 05:20:02
[sftp.1]
Fix cut'n'paste error, spotted by matthias.riese@b-novative.de; ok deraadt@
- millert@cvs.openbsd.org 2002/12/09 16:50:30
[ssh.c]
Avoid setting optind to 0 as GNU getopt treats that like we do optreset.
markus@ OK
20021205
- (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
@ -886,4 +890,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
$Id: ChangeLog,v 1.2529 2002/12/23 02:23:37 mouring Exp $
$Id: ChangeLog,v 1.2530 2002/12/23 02:24:54 mouring Exp $

9
ssh.c
View File

@ -40,7 +40,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: ssh.c,v 1.188 2002/11/27 17:53:35 markus Exp $");
RCSID("$OpenBSD: ssh.c,v 1.189 2002/12/09 16:50:30 millert Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@ -505,12 +505,11 @@ again:
host = ++cp;
} else
host = *av;
ac--, av++;
if (ac > 0) {
optind = 0;
optreset = 1;
if (ac > 1) {
optind = optreset = 1;
goto again;
}
ac--, av++;
}
/* Check that we got a host name. */