mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 08:14:24 +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
|
#ifdef WINDOWS
|
||||||
/* Windows POSIX adpater does not support fdopen() on open(file)*/
|
/* Windows POSIX adpater does not support fdopen() on open(file)*/
|
||||||
close(fd);
|
close(fd);
|
||||||
chmod(identity_file, 0644);
|
chmod(pub_tmp, 0644);
|
||||||
if ((f = fopen(identity_file, "w")) == NULL) {
|
if ((f = fopen(pub_tmp, "w")) == NULL) {
|
||||||
error("fopen %s failed: %s", identity_file, strerror(errno));
|
error("fopen %s failed: %s", pub_tmp, strerror(errno));
|
||||||
#else /* !WINDOWS */
|
#else /* !WINDOWS */
|
||||||
(void)fchmod(fd, 0644);
|
(void)fchmod(fd, 0644);
|
||||||
f = fdopen(fd, "w");
|
f = fdopen(fd, "w");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user