diff options
author | eadler <eadler@FreeBSD.org> | 2012-05-15 20:15:17 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2012-05-15 20:15:17 +0000 |
commit | 2179867a54092808aee0c148d893d946050fba07 (patch) | |
tree | 81b256dfc8a97ded99f5957a50183f39dc66005f /share/examples/csh | |
parent | 63d85c1c1286b6306555b6e589331bd89d5e618d (diff) | |
download | FreeBSD-src-2179867a54092808aee0c148d893d946050fba07.zip FreeBSD-src-2179867a54092808aee0c148d893d946050fba07.tar.gz |
Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent
socket path if running
PR: 167932
Submitted by: madpilot (pr)
Submitted by: wblock (final patch)
Reviewed by: If someone else reviewed your modification.
Approved by: cperciva (implicit)
MFC after: 3 days
Diffstat (limited to 'share/examples/csh')
-rw-r--r-- | share/examples/csh/dot.cshrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/examples/csh/dot.cshrc b/share/examples/csh/dot.cshrc index 17951d4..175bfd2 100644 --- a/share/examples/csh/dot.cshrc +++ b/share/examples/csh/dot.cshrc @@ -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 |