Bugzilla – Attachment 1774 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]
log (to debug) the reason for failing to load a private key
ssh-passphrase.patch (text/plain), 1.45 KB, created by
Darren Tucker
on 2010-01-11 15:16:15 AEDT
(
hide
)
Description:
log (to debug) the reason for failing to load a private key
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2010-01-11 15:16:15 AEDT
Size:
1.45 KB
patch
obsolete
>Index: authfile.c >=================================================================== >RCS file: /home/dtucker/openssh/cvs/openssh/authfile.c,v >retrieving revision 1.79 >diff -u -p -r1.79 authfile.c >--- authfile.c 7 Nov 2009 05:03:14 -0000 1.79 >+++ authfile.c 11 Jan 2010 04:00:04 -0000 >@@ -559,7 +559,12 @@ key_load_private_type(int type, const ch > int fd; > > fd = open(filename, O_RDONLY); >- if (fd < 0) >+ if (fd < 0) { >+ debug("could not open key file '%s': %s", filename, >+ strerror(errno)); >+ if (perm_ok != NULL) >+ *perm_ok = 0; >+ } > return NULL; > if (!key_perm_ok(fd, filename)) { > if (perm_ok != NULL) >@@ -595,8 +600,11 @@ key_load_private(const char *filename, c > int fd; > > fd = open(filename, O_RDONLY); >- if (fd < 0) >+ if (fd < 0) { >+ debug("could not open key file '%s': %s", filename, >+ strerror(errno)); > return NULL; >+ } > if (!key_perm_ok(fd, filename)) { > error("bad permissions: ignore key: %s", filename); > close(fd); >Index: sshconnect2.c >=================================================================== >RCS file: /home/dtucker/openssh/cvs/openssh/sshconnect2.c,v >retrieving revision 1.169 >diff -u -p -r1.169 sshconnect2.c >--- sshconnect2.c 8 Jan 2010 07:58:05 -0000 1.169 >+++ sshconnect2.c 11 Jan 2010 04:00:35 -0000 >@@ -1250,7 +1250,7 @@ load_identity_file(char *filename) > { > Key *private; > char prompt[300], *passphrase; >- int perm_ok, quit, i; >+ int perm_ok = 0, quit, i; > struct stat st; > > if (stat(filename, &st) < 0) {
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
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 1693
:
1767
| 1774