NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/56731: new ssh does not read .ssh/known_hosts*



The following reply was made to PR bin/56731; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/56731: new ssh does not read .ssh/known_hosts*
Date: Sat, 26 Feb 2022 13:36:17 +0100

 This patch seems to work around the problem, but I'm not sure it is
 correct for all cases - misc.c could use a re-sync with upstream, it seems.
 
 Martin
 
 
 Index: misc.c
 ===================================================================
 RCS file: /cvsroot/src/crypto/external/bsd/openssh/dist/misc.c,v
 retrieving revision 1.29
 diff -u -p -r1.29 misc.c
 --- misc.c	23 Feb 2022 19:07:20 -0000	1.29
 +++ misc.c	26 Feb 2022 12:34:08 -0000
 @@ -1146,8 +1146,11 @@ tilde_expand(const char *filename, uid_t
  		sep = "";
  
  	/* Skip leading '/' from specified path */
 -	if (path != NULL)
 -		filename = path + 1;
 +	if (path != NULL) {
 +		filename = path;
 +		if (*filename == '/')
 +			filename++;
 +	}
  
  	if ((r = xasprintf(&s, "%s%s%s", homedir, sep, filename)) <= 0) {
  		error_f("xasprintf failed");
 


Home | Main Index | Thread Index | Old Index