mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-22 15:47:37 +00:00
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
This commit is contained in:
parent
5e1ba35cea
commit
06c34e294a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235481
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user