Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 06:58:38 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r237288 - stable/8/share/examples/csh
Message-ID:  <201206200658.q5K6wcDj024926@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Wed Jun 20 06:58:38 2012
New Revision: 237288
URL: http://svn.freebsd.org/changeset/base/237288

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/8/share/examples/csh/dot.cshrc
Directory Properties:
  stable/8/share/examples/csh/   (props changed)

Modified: stable/8/share/examples/csh/dot.cshrc
==============================================================================
--- stable/8/share/examples/csh/dot.cshrc	Wed Jun 20 06:58:17 2012	(r237287)
+++ stable/8/share/examples/csh/dot.cshrc	Wed Jun 20 06:58:38 2012	(r237288)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206200658.q5K6wcDj024926>