summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--authfile.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index acf4ea270..f3f43a13f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,11 @@
19 - jmc@cvs.openbsd.org 2011/05/23 07:10:21 19 - jmc@cvs.openbsd.org 2011/05/23 07:10:21
20 [sshd.8 sshd_config.5] 20 [sshd.8 sshd_config.5]
21 tweak previous; ok djm 21 tweak previous; ok djm
22 - djm@cvs.openbsd.org 2011/05/23 07:24:57
23 [authfile.c]
24 read in key comments for v.2 keys (though note that these are not
25 passed over the agent protocol); bz#439, based on patch from binder
26 AT arago.de; ok markus@
22 27
2320110520 2820110520
24 - (djm) [session.c] call setexeccon() before executing passwd for pw 29 - (djm) [session.c] call setexeccon() before executing passwd for pw
diff --git a/authfile.c b/authfile.c
index 734d657e9..96d2bf338 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.90 2011/05/13 00:05:36 djm Exp $ */ 1/* $OpenBSD: authfile.c,v 1.91 2011/05/23 07:24:57 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -774,8 +774,11 @@ key_try_load_public(Key *k, const char *filename, char **commentp)
774 ; 774 ;
775 if (*cp) { 775 if (*cp) {
776 if (key_read(k, &cp) == 1) { 776 if (key_read(k, &cp) == 1) {
777 if (commentp) 777 cp[strcspn(cp, "\r\n")] = '\0';
778 *commentp=xstrdup(filename); 778 if (commentp) {
779 *commentp = xstrdup(*cp ?
780 cp : filename);
781 }
779 fclose(f); 782 fclose(f);
780 return 1; 783 return 1;
781 } 784 }