[openssh-commits] [openssh] 04/08: upstream: pwcopy() struct passwd that we're going to reuse across a

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Mar 13 13:55:08 AEDT 2021


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit f07519a2af96109325b5a48b1af18b57601074ca
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Mar 12 03:43:40 2021 +0000

    upstream: pwcopy() struct passwd that we're going to reuse across a
    
    bunch of library calls; bz3273 ok dtucker@
    
    OpenBSD-Commit-ID: b6eafa977b2e44607b1b121f5de855107809b762
---
 ssh-keygen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ssh-keygen.c b/ssh-keygen.c
index cfb5f115..a442dc8e 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.427 2020/12/20 23:36:51 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.428 2021/03/12 03:43:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -3154,6 +3154,7 @@ main(int argc, char **argv)
 	pw = getpwuid(getuid());
 	if (!pw)
 		fatal("No user exists for uid %lu", (u_long)getuid());
+	pw = pwcopy(pw);
 	if (gethostname(hostname, sizeof(hostname)) == -1)
 		fatal("gethostname: %s", strerror(errno));
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list