version 1.15, 2000/09/21 11:25:32 |
version 1.16, 2000/09/27 21:41:34 |
|
|
if (fstat(fileno(f), &st) < 0 || |
if (fstat(fileno(f), &st) < 0 || |
(st.st_uid != 0 && st.st_uid != pw->pw_uid) || |
(st.st_uid != 0 && st.st_uid != pw->pw_uid) || |
(st.st_mode & 022) != 0) { |
(st.st_mode & 022) != 0) { |
snprintf(buf, sizeof buf, "DSA authentication refused for %.100s: " |
snprintf(buf, sizeof buf, |
"bad ownership or modes for '%s'.", pw->pw_name, file); |
"%s authentication refused for %.100s: " |
|
"bad ownership or modes for '%s'.", |
|
key_type(key), pw->pw_name, file); |
fail = 1; |
fail = 1; |
} else { |
} else { |
/* Check path to SSH_USER_PERMITTED_KEYS */ |
/* Check path to SSH_USER_PERMITTED_KEYS */ |
|
|
(st.st_uid != 0 && st.st_uid != pw->pw_uid) || |
(st.st_uid != 0 && st.st_uid != pw->pw_uid) || |
(st.st_mode & 022) != 0) { |
(st.st_mode & 022) != 0) { |
snprintf(buf, sizeof buf, |
snprintf(buf, sizeof buf, |
"DSA authentication refused for %.100s: " |
"%s authentication refused for %.100s: " |
"bad ownership or modes for '%s'.", |
"bad ownership or modes for '%s'.", |
pw->pw_name, line); |
key_type(key), pw->pw_name, line); |
fail = 1; |
fail = 1; |
break; |
break; |
} |
} |
|
|
} |
} |
} |
} |
found_key = 0; |
found_key = 0; |
found = key_new(KEY_DSA); |
found = key_new(key->type); |
|
|
while (fgets(line, sizeof(line), f)) { |
while (fgets(line, sizeof(line), f)) { |
char *cp, *options = NULL; |
char *cp, *options = NULL; |