version 1.28, 2001/01/18 17:00:00 |
version 1.29, 2001/01/19 15:55:10 |
|
|
#include "auth.h" |
#include "auth.h" |
#include "key.h" |
#include "key.h" |
#include "kex.h" |
#include "kex.h" |
|
#include "pathnames.h" |
|
|
#include "uidswap.h" |
#include "uidswap.h" |
#include "auth-options.h" |
#include "auth-options.h" |
|
|
|
|
/* The authorized keys. */ |
/* The authorized keys. */ |
snprintf(file, sizeof file, "%.500s/%.100s", pw->pw_dir, |
snprintf(file, sizeof file, "%.500s/%.100s", pw->pw_dir, |
SSH_USER_PERMITTED_KEYS2); |
_PATH_SSH_USER_PERMITTED_KEYS2); |
|
|
/* Fail quietly if file does not exist */ |
/* Fail quietly if file does not exist */ |
if (stat(file, &st) < 0) { |
if (stat(file, &st) < 0) { |
|
|
key_type(key), pw->pw_name, file); |
key_type(key), pw->pw_name, file); |
fail = 1; |
fail = 1; |
} else { |
} else { |
/* Check path to SSH_USER_PERMITTED_KEYS */ |
/* Check path to _PATH_SSH_USER_PERMITTED_KEYS */ |
int i; |
int i; |
static const char *check[] = { |
static const char *check[] = { |
"", SSH_USER_DIR, NULL |
"", _PATH_SSH_USER_DIR, NULL |
}; |
}; |
for (i = 0; check[i]; i++) { |
for (i = 0; check[i]; i++) { |
snprintf(line, sizeof line, "%.500s/%.100s", |
snprintf(line, sizeof line, "%.500s/%.100s", |