Skip to content

Commit

Permalink
Don't zero usesshagent
Browse files Browse the repository at this point in the history
`usesshagent` is just a flag to determine whether or not to use the agent, so
zeroing it isn't necessary. Even worse, since it only gets a reference to one
of the flag strings (stored in the AST), zeroing them globally changes those
strings, disabling ssh-agent authentication entirely.

Fixes the problem noted in #16041
  • Loading branch information
Keno committed Jul 28, 2016
1 parent 133d080 commit 064a0e9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions base/libgit2/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ reset!(p::UserPasswordCredentials, cnt::Int=3) = (p.count = cnt)
function securezero!(cred::UserPasswordCredentials)
securezero!(cred.user)
securezero!(cred.pass)
securezero!(cred.usesshagent)
cred.count = 0
return cred
end
Expand All @@ -755,7 +754,6 @@ function securezero!(cred::SSHCredentials)
securezero!(cred.pass)
securezero!(cred.pubkey)
securezero!(cred.prvkey)
securezero!(cred.usesshagent)
return cred
end

Expand Down

0 comments on commit 064a0e9

Please sign in to comment.