mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-23 22:15:37 +02:00
fix issue #1058
This commit is contained in:
parent
23e46f5bb4
commit
5758b1d725
@ -1541,10 +1541,7 @@ do_change_comment(struct passwd *pw)
|
|||||||
sshkey_free(private);
|
sshkey_free(private);
|
||||||
|
|
||||||
strlcat(identity_file, ".pub", sizeof(identity_file));
|
strlcat(identity_file, ".pub", sizeof(identity_file));
|
||||||
fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
f = fopen(identity_file, "w");
|
||||||
if (fd == -1)
|
|
||||||
fatal("Could not save your public key in %s", identity_file);
|
|
||||||
f = fdopen(fd, "w");
|
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
fatal("fdopen %s failed: %s", identity_file, strerror(errno));
|
fatal("fdopen %s failed: %s", identity_file, strerror(errno));
|
||||||
if ((r = sshkey_write(public, f)) != 0)
|
if ((r = sshkey_write(public, f)) != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user