From nobody@FreeBSD.org  Mon Apr 22 19:44:37 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id D4B3D465
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 22 Apr 2013 19:44:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C521C110D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 22 Apr 2013 19:44:37 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3MJibuM075227
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 22 Apr 2013 19:44:37 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r3MJibQn075226;
	Mon, 22 Apr 2013 19:44:37 GMT
	(envelope-from nobody)
Message-Id: <201304221944.r3MJibQn075226@red.freebsd.org>
Date: Mon, 22 Apr 2013 19:44:37 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "no such identity" noise from ssh(1) on CURRENT after upgrading to 6.2p1
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178060
>Category:       bin
>Synopsis:       "no such identity" noise from ssh(1) on CURRENT after upgrading to 6.2p1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 22 19:50:00 UTC 2013
>Closed-Date:    Tue Apr 23 07:18:43 UTC 2013
>Last-Modified:  Wed Apr 24 12:40:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+ba9afe9: Fri Apr 19 20:29:10 PDT 2013     gcooper@gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO  amd64
>Description:
I'm seeing noise from ssh(1) about pubkeys being missing on login after upgrading CURRENT. It seems 

$ ssh -V       
OpenSSH_6.2p1, OpenSSL 1.0.1e-freebsd 11 Feb 2013
$ ssh forza
no such identity: /home/gcooper/.ssh/id_dsa: No such file or directory
no such identity: /home/gcooper/.ssh/id_ecdsa: No such file or directory
Password for gcooper@forza.west.isilon.com:

$

There's a patch floating around to fix this, but I'm not sure whether or not it's made it into openssh proper:

https://github.com/OpenELEC/OpenELEC.tv/pull/2120
>How-To-Repeat:
Try to login to another machine from a 10-CURRENT box without SSH keys.
>Fix:
See https://github.com/OpenELEC/OpenELEC.tv/pull/2120

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: des 
Responsible-Changed-When: Tue Apr 23 07:16:41 UTC 2013 
Responsible-Changed-Why:  
OpenSSH is mine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178060 
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Tue Apr 23 07:18:42 UTC 2013 
State-Changed-Why:  
Fixed in r249016 on 2013-04-02 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178060 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/178060: commit references a PR
Date: Wed, 24 Apr 2013 12:36:45 +0000 (UTC)

 Author: des
 Date: Wed Apr 24 12:36:37 2013
 New Revision: 249839
 URL: http://svnweb.freebsd.org/changeset/base/249839
 
 Log:
   Merge updated "no such identity file" patch.
   
   PR:		bin/178060
 
 Modified:
   head/crypto/openssh/readconf.c
   head/crypto/openssh/readconf.h
   head/crypto/openssh/ssh.c
 Directory Properties:
   head/crypto/openssh/   (props changed)
 
 Modified: head/crypto/openssh/readconf.c
 ==============================================================================
 --- head/crypto/openssh/readconf.c	Wed Apr 24 11:53:46 2013	(r249838)
 +++ head/crypto/openssh/readconf.c	Wed Apr 24 12:36:37 2013	(r249839)
 @@ -1,4 +1,4 @@
 -/* $OpenBSD: readconf.c,v 1.195 2013/02/17 23:16:57 dtucker Exp $ */
 +/* $OpenBSD: readconf.c,v 1.196 2013/02/22 04:45:08 dtucker Exp $ */
  /* $FreeBSD$ */
  /*
   * Author: Tatu Ylonen <ylo@cs.hut.fi>
 @@ -403,7 +403,7 @@ parse_token(const char *cp, const char *
  int
  process_config_line(Options *options, const char *host,
  		    char *line, const char *filename, int linenum,
 -		    int *activep)
 +		    int *activep, int userconfig)
  {
  	char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
  	char **cpptr, fwdarg[256];
 @@ -636,7 +636,7 @@ parse_yesnoask:
  			if (*intptr >= SSH_MAX_IDENTITY_FILES)
  				fatal("%.200s line %d: Too many identity files specified (max %d).",
  				    filename, linenum, SSH_MAX_IDENTITY_FILES);
 -			add_identity_file(options, NULL, arg, 1);
 +			add_identity_file(options, NULL, arg, userconfig);
  		}
  		break;
  
 @@ -1180,7 +1180,7 @@ parse_int:
  
  int
  read_config_file(const char *filename, const char *host, Options *options,
 -    int checkperm)
 +    int flags)
  {
  	FILE *f;
  	char line[1024];
 @@ -1190,7 +1190,7 @@ read_config_file(const char *filename, c
  	if ((f = fopen(filename, "r")) == NULL)
  		return 0;
  
 -	if (checkperm) {
 +	if (flags & SSHCONF_CHECKPERM) {
  		struct stat sb;
  
  		if (fstat(fileno(f), &sb) == -1)
 @@ -1211,7 +1211,8 @@ read_config_file(const char *filename, c
  	while (fgets(line, sizeof(line), f)) {
  		/* Update line number counter. */
  		linenum++;
 -		if (process_config_line(options, host, line, filename, linenum, &active) != 0)
 +		if (process_config_line(options, host, line, filename, linenum,
 +		    &active, flags & SSHCONF_USERCONF) != 0)
  			bad_options++;
  	}
  	fclose(f);
 @@ -1394,30 +1395,17 @@ fill_default_options(Options * options)
  		options->protocol = SSH_PROTO_2;
  	if (options->num_identity_files == 0) {
  		if (options->protocol & SSH_PROTO_1) {
 -			len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1;
 -			options->identity_files[options->num_identity_files] =
 -			    xmalloc(len);
 -			snprintf(options->identity_files[options->num_identity_files++],
 -			    len, "~/%.100s", _PATH_SSH_CLIENT_IDENTITY);
 +			add_identity_file(options, "~/",
 +			    _PATH_SSH_CLIENT_IDENTITY, 0);
  		}
  		if (options->protocol & SSH_PROTO_2) {
 -			len = 2 + strlen(_PATH_SSH_CLIENT_ID_RSA) + 1;
 -			options->identity_files[options->num_identity_files] =
 -			    xmalloc(len);
 -			snprintf(options->identity_files[options->num_identity_files++],
 -			    len, "~/%.100s", _PATH_SSH_CLIENT_ID_RSA);
 -
 -			len = 2 + strlen(_PATH_SSH_CLIENT_ID_DSA) + 1;
 -			options->identity_files[options->num_identity_files] =
 -			    xmalloc(len);
 -			snprintf(options->identity_files[options->num_identity_files++],
 -			    len, "~/%.100s", _PATH_SSH_CLIENT_ID_DSA);
 +			add_identity_file(options, "~/",
 +			    _PATH_SSH_CLIENT_ID_RSA, 0);
 +			add_identity_file(options, "~/",
 +			    _PATH_SSH_CLIENT_ID_DSA, 0);
  #ifdef OPENSSL_HAS_ECC
 -			len = 2 + strlen(_PATH_SSH_CLIENT_ID_ECDSA) + 1;
 -			options->identity_files[options->num_identity_files] =
 -			    xmalloc(len);
 -			snprintf(options->identity_files[options->num_identity_files++],
 -			    len, "~/%.100s", _PATH_SSH_CLIENT_ID_ECDSA);
 +			add_identity_file(options, "~/",
 +			    _PATH_SSH_CLIENT_ID_ECDSA, 0);
  #endif
  		}
  	}
 
 Modified: head/crypto/openssh/readconf.h
 ==============================================================================
 --- head/crypto/openssh/readconf.h	Wed Apr 24 11:53:46 2013	(r249838)
 +++ head/crypto/openssh/readconf.h	Wed Apr 24 12:36:37 2013	(r249839)
 @@ -1,4 +1,4 @@
 -/* $OpenBSD: readconf.h,v 1.92 2013/02/17 23:16:57 dtucker Exp $ */
 +/* $OpenBSD: readconf.h,v 1.93 2013/02/22 04:45:09 dtucker Exp $ */
  /* $FreeBSD$ */
  
  /*
 @@ -163,13 +163,17 @@ typedef struct {
  #define REQUEST_TTY_YES		2
  #define REQUEST_TTY_FORCE	3
  
 +#define SSHCONF_CHECKPERM	1  /* check permissions on config file */
 +#define SSHCONF_USERCONF	2  /* user provided config file not system */
 +
  void     initialize_options(Options *);
  void     fill_default_options(Options *);
  int	 read_config_file(const char *, const char *, Options *, int);
  int	 parse_forward(Forward *, const char *, int, int);
  
  int
 -process_config_line(Options *, const char *, char *, const char *, int, int *);
 +process_config_line(Options *, const char *, char *, const char *, int, int *,
 +    int);
  
  void	 add_local_forward(Options *, const Forward *);
  void	 add_remote_forward(Options *, const Forward *);
 
 Modified: head/crypto/openssh/ssh.c
 ==============================================================================
 --- head/crypto/openssh/ssh.c	Wed Apr 24 11:53:46 2013	(r249838)
 +++ head/crypto/openssh/ssh.c	Wed Apr 24 12:36:37 2013	(r249839)
 @@ -1,4 +1,4 @@
 -/* $OpenBSD: ssh.c,v 1.371 2013/02/17 23:16:57 dtucker Exp $ */
 +/* $OpenBSD: ssh.c,v 1.373 2013/02/22 22:09:01 djm Exp $ */
  /* $FreeBSD$ */
  /*
   * Author: Tatu Ylonen <ylo@cs.hut.fi>
 @@ -598,7 +598,8 @@ main(int ac, char **av)
  			dummy = 1;
  			line = xstrdup(optarg);
  			if (process_config_line(&options, host ? host : "",
 -			    line, "command-line", 0, &dummy) != 0)
 +			    line, "command-line", 0, &dummy, SSHCONF_USERCONF)
 +			    != 0)
  				exit(255);
  			xfree(line);
  			break;
 @@ -692,14 +693,15 @@ main(int ac, char **av)
  	 * file if the user specifies a config file on the command line.
  	 */
  	if (config != NULL) {
 -		if (!read_config_file(config, host, &options, 0))
 +		if (!read_config_file(config, host, &options, SSHCONF_USERCONF))
  			fatal("Can't open user config file %.100s: "
  			    "%.100s", config, strerror(errno));
  	} else {
  		r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir,
  		    _PATH_SSH_USER_CONFFILE);
  		if (r > 0 && (size_t)r < sizeof(buf))
 -			(void)read_config_file(buf, host, &options, 1);
 +			(void)read_config_file(buf, host, &options,
 +			     SSHCONF_CHECKPERM|SSHCONF_USERCONF);
  
  		/* Read systemwide configuration file after user config. */
  		(void)read_config_file(_PATH_HOST_CONFIG_FILE, host,
 @@ -1611,7 +1613,8 @@ load_public_identity_files(void)
  		fatal("load_public_identity_files: gethostname: %s",
  		    strerror(errno));
  	for (i = 0; i < options.num_identity_files; i++) {
 -		if (n_ids >= SSH_MAX_IDENTITY_FILES) {
 +		if (n_ids >= SSH_MAX_IDENTITY_FILES ||
 +		    strcasecmp(options.identity_files[i], "none") == 0) {
  			xfree(options.identity_files[i]);
  			continue;
  		}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
