Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
f1dd97bb
Unverified
Commit
f1dd97bb
authored
Oct 23, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ssh-agent): fix check for running `ssh-agent` process with hidepid /proc (#8492)
Fixes #8492
parent
46f8765f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ssh-agent.plugin.zsh
plugins/ssh-agent/ssh-agent.plugin.zsh
+5
-3
No files found.
plugins/ssh-agent/ssh-agent.plugin.zsh
View file @
f1dd97bb
...
@@ -6,9 +6,11 @@ function _start_agent() {
...
@@ -6,9 +6,11 @@ function _start_agent() {
if
[[
-f
"
$ssh_env_cache
"
]]
;
then
if
[[
-f
"
$ssh_env_cache
"
]]
;
then
.
"
$ssh_env_cache
"
>
/dev/null
.
"
$ssh_env_cache
"
>
/dev/null
{
# Test if $SSH_AUTH_SOCK is visible
[[
"
$USERNAME
"
=
root
]]
&&
command
ps ax
||
command
ps x
zmodload zsh/net/socket
}
|
command grep
ssh-agent |
command grep
-q
$SSH_AGENT_PID
&&
return
0
if
[[
-S
"
$SSH_AUTH_SOCK
"
]]
&&
zsocket
"
$SSH_AUTH_SOCK
"
2>/dev/null
;
then
return
0
fi
fi
fi
# Set a maximum lifetime for identities added to ssh-agent
# Set a maximum lifetime for identities added to ssh-agent
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment