From owner-svn-src-all@FreeBSD.ORG Wed Jun 20 06:58:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C7A7106566B; Wed, 20 Jun 2012 06:58:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17B038FC0A; Wed, 20 Jun 2012 06:58:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5K6wHDP024881; Wed, 20 Jun 2012 06:58:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5K6wH1j024879; Wed, 20 Jun 2012 06:58:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206200658.q5K6wH1j024879@svn.freebsd.org> From: Eitan Adler Date: Wed, 20 Jun 2012 06:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237287 - stable/9/share/examples/csh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2012 06:58:18 -0000 Author: eadler Date: Wed Jun 20 06:58:17 2012 New Revision: 237287 URL: http://svn.freebsd.org/changeset/base/237287 Log: MFC r236999: Include a warning when using the example code as it may not work in unusual situations. Also slightly optimize the command. Approved by: cperciva (implicit) Modified: stable/9/share/examples/csh/dot.cshrc Directory Properties: stable/9/share/examples/csh/ (props changed) Modified: stable/9/share/examples/csh/dot.cshrc ============================================================================== --- stable/9/share/examples/csh/dot.cshrc Wed Jun 20 06:38:41 2012 (r237286) +++ stable/9/share/examples/csh/dot.cshrc Wed Jun 20 06:58:17 2012 (r237287) @@ -4,8 +4,12 @@ # # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running +# +# This has a couple caveats, the most notable being that if a user +# has multiple ssh-agent(1) processes running, this will very likely +# set SSH_AUTH_SOCK to point to the wrong file/domain socket. if (${?SSH_AUTH_SOCK} != "1") then - setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk '/ssh-agent/ { print $6 }'` + setenv SSH_AUTH_SOCK `sockstat -u | awk '/^${USER}.+ ssh-agent/ { print $6 }' endif # Change only root's prompt