mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 00:04:30 +02:00
Ported changes to support Windows
This commit is contained in:
parent
4a5fe9ea92
commit
4f288aeeab
@ -1071,9 +1071,9 @@ do_gen_all_hostkeys(struct passwd *pw)
|
||||
#ifdef WINDOWS
|
||||
/* Windows POSIX adpater does not support fdopen() on open(file)*/
|
||||
close(fd);
|
||||
chmod(identity_file, 0644);
|
||||
if ((f = fopen(identity_file, "w")) == NULL) {
|
||||
error("fopen %s failed: %s", identity_file, strerror(errno));
|
||||
chmod(pub_tmp, 0644);
|
||||
if ((f = fopen(pub_tmp, "w")) == NULL) {
|
||||
error("fopen %s failed: %s", pub_tmp, strerror(errno));
|
||||
#else /* !WINDOWS */
|
||||
(void)fchmod(fd, 0644);
|
||||
f = fdopen(fd, "w");
|
||||
|
Loading…
x
Reference in New Issue
Block a user