svn commit: r236382 - stable/9/share/examples/csh

Eitan Adler eadler at FreeBSD.org
Fri Jun 1 06:39:56 UTC 2012


Author: eadler
Date: Fri Jun  1 06:39:55 2012
New Revision: 236382
URL: http://svn.freebsd.org/changeset/base/236382

Log:
  MFC r235481:
  	Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent
  	socket path if running
  
  PR:		167932
  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	Fri Jun  1 06:20:39 2012	(r236381)
+++ stable/9/share/examples/csh/dot.cshrc	Fri Jun  1 06:39:55 2012	(r236382)
@@ -5,7 +5,7 @@
 
 # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running
 if (${?SSH_AUTH_SOCK} != "1") then
-	setenv SSH_AUTH_SOCK `sockstat | grep "${USER}" | cut -d ' ' -f 6` 
+	setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk '/ssh-agent/ { print $6 }'`
 endif
 
 # Change only root's prompt


More information about the svn-src-stable-9 mailing list