summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2018-07-09 21:59:10 +0000
committerDamien Miller <djm@mindrot.org>2018-07-10 16:44:17 +1000
commit49f47e656b60bcd1d1db98d88105295f4b4e600d (patch)
tree95ace6a7ae985233385ba2799b82a4672238f9aa /ssh-keygen.c
parentcb30cd47041edb03476be1c8ef7bc1f4b69d1555 (diff)
upstream: replace cast with call to sshbuf_mutable_ptr(); ok djm@
OpenBSD-Commit-ID: 4dfe9d29fa93d9231645c89084f7217304f7ba29
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index ccebbaf76..822e7e7c4 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.317 2018/06/06 18:29:18 markus Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.318 2018/07/09 21:59:10 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2255,7 +2255,7 @@ do_gen_krl(struct passwd *pw, int updating, int argc, char **argv)
2255 fatal("Couldn't generate KRL"); 2255 fatal("Couldn't generate KRL");
2256 if ((fd = open(identity_file, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) 2256 if ((fd = open(identity_file, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
2257 fatal("open %s: %s", identity_file, strerror(errno)); 2257 fatal("open %s: %s", identity_file, strerror(errno));
2258 if (atomicio(vwrite, fd, (void *)sshbuf_ptr(kbuf), sshbuf_len(kbuf)) != 2258 if (atomicio(vwrite, fd, sshbuf_mutable_ptr(kbuf), sshbuf_len(kbuf)) !=
2259 sshbuf_len(kbuf)) 2259 sshbuf_len(kbuf))
2260 fatal("write %s: %s", identity_file, strerror(errno)); 2260 fatal("write %s: %s", identity_file, strerror(errno));
2261 close(fd); 2261 close(fd);