Bugzilla – Attachment 1767 Details for
Bug 1693
ssh prompts for passphrase even when identity file is unreadable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Uses access(2) to check readability of identity file before loading
openssh-5.3p1-identity-read-access.patch (text/plain), 1008 bytes, created by
TJ Saunders
on 2010-01-08 03:29:21 AEDT
(
hide
)
Description:
Uses access(2) to check readability of identity file before loading
Filename:
MIME Type:
Creator:
TJ Saunders
Created:
2010-01-08 03:29:21 AEDT
Size:
1008 bytes
patch
obsolete
>diff -ur openssh-5.3p1/sshconnect2.c openssh-5.3p1-patched/sshconnect2.c >--- openssh-5.3p1/sshconnect2.c 2009-03-05 05:58:22.000000000 -0800 >+++ openssh-5.3p1-patched/sshconnect2.c 2010-01-07 08:18:42.000000000 -0800 >@@ -1231,6 +1231,12 @@ > debug3("no such identity: %s", filename); > return NULL; > } >+ >+ if (access(filename, R_OK) < 0) { >+ debug3("cannot read identity: %s", filename); >+ return NULL; >+ } >+ > private = key_load_private_type(KEY_UNSPEC, filename, "", NULL, &perm_ok); > if (!perm_ok) > return NULL; >diff -ur openssh-5.3p1/ssh-keygen.c openssh-5.3p1-patched/ssh-keygen.c >--- openssh-5.3p1/ssh-keygen.c 2009-06-21 23:11:07.000000000 -0700 >+++ openssh-5.3p1-patched/ssh-keygen.c 2010-01-07 08:17:50.000000000 -0800 >@@ -953,6 +953,10 @@ > perror(identity_file); > exit(1); > } >+ if (access(identity_file, R_OK) < 0) { >+ perror(identity_file); >+ exit(1); >+ } > private = key_load_private(identity_file, "", &comment); > if (private == NULL) { > if (identity_passphrase)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1693
:
1767
|
1774