We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23e46f5 commit 5758b1dCopy full SHA for 5758b1d
ssh-keygen.c
@@ -1541,10 +1541,7 @@ do_change_comment(struct passwd *pw)
1541
sshkey_free(private);
1542
1543
strlcat(identity_file, ".pub", sizeof(identity_file));
1544
- fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
1545
- if (fd == -1)
1546
- fatal("Could not save your public key in %s", identity_file);
1547
- f = fdopen(fd, "w");
+ f = fopen(identity_file, "w");
1548
if (f == NULL)
1549
fatal("fdopen %s failed: %s", identity_file, strerror(errno));
1550
if ((r = sshkey_write(public, f)) != 0)
0 commit comments