sshd.exe hostkeys loading fix
sshd.exe would not find ssh_host keys without this change. Chnage made for test running reveresed
This commit is contained in:
parent
cae05764b0
commit
6b70a283cb
|
@ -102,19 +102,13 @@ sshkey_load_file(int fd, struct sshbuf *blob)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
#ifndef WIN32_FIXME
|
|
||||||
if (fstat(fd, &st) < 0)
|
if (fstat(fd, &st) < 0)
|
||||||
return SSH_ERR_SYSTEM_ERROR;
|
return SSH_ERR_SYSTEM_ERROR;
|
||||||
if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
|
if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
|
||||||
st.st_size > MAX_KEY_FILE_SIZE)
|
st.st_size > MAX_KEY_FILE_SIZE)
|
||||||
return SSH_ERR_INVALID_FORMAT;
|
return SSH_ERR_INVALID_FORMAT;
|
||||||
#endif
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
#ifdef WIN32_FIXME
|
|
||||||
if ((len = atomicio(_read, fd, buf, sizeof(buf))) == 0) {
|
|
||||||
#else
|
|
||||||
if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
|
if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
|
||||||
#endif
|
|
||||||
if (errno == EPIPE)
|
if (errno == EPIPE)
|
||||||
break;
|
break;
|
||||||
r = SSH_ERR_SYSTEM_ERROR;
|
r = SSH_ERR_SYSTEM_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue