version 1.57.2.2, 2004/08/19 22:37:30 |
version 1.58, 2003/11/04 08:54:09 |
|
|
#include "packet.h" |
#include "packet.h" |
#include "xmalloc.h" |
#include "xmalloc.h" |
#include "ssh1.h" |
#include "ssh1.h" |
|
#include "mpaux.h" |
#include "uidswap.h" |
#include "uidswap.h" |
#include "match.h" |
#include "match.h" |
#include "auth-options.h" |
#include "auth-options.h" |
|
|
*/ |
*/ |
while (fgets(line, sizeof(line), f)) { |
while (fgets(line, sizeof(line), f)) { |
char *cp; |
char *cp; |
char *key_options; |
char *options; |
|
|
linenum++; |
linenum++; |
|
|
|
|
*/ |
*/ |
if (*cp < '0' || *cp > '9') { |
if (*cp < '0' || *cp > '9') { |
int quoted = 0; |
int quoted = 0; |
key_options = cp; |
options = cp; |
for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { |
for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { |
if (*cp == '\\' && cp[1] == '"') |
if (*cp == '\\' && cp[1] == '"') |
cp++; /* Skip both */ |
cp++; /* Skip both */ |
|
|
quoted = !quoted; |
quoted = !quoted; |
} |
} |
} else |
} else |
key_options = NULL; |
options = NULL; |
|
|
/* Parse the key from the line. */ |
/* Parse the key from the line. */ |
if (hostfile_read_key(&cp, &bits, key) == 0) { |
if (hostfile_read_key(&cp, &bits, key) == 0) { |
|
|
* If our options do not allow this key to be used, |
* If our options do not allow this key to be used, |
* do not send challenge. |
* do not send challenge. |
*/ |
*/ |
if (!auth_parse_options(pw, key_options, file, linenum)) |
if (!auth_parse_options(pw, options, file, linenum)) |
continue; |
continue; |
|
|
/* break out, this key is allowed */ |
/* break out, this key is allowed */ |