Bugzilla – Attachment 1083 Details for
Bug 1159
%u and %h not handled in IdentityFile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised diff
identityfile.diff (text/plain), 1.22 KB, created by
Damien Miller
on 2006-02-26 12:53:54 AEDT
(
hide
)
Description:
Revised diff
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2006-02-26 12:53:54 AEDT
Size:
1.22 KB
patch
obsolete
>Index: ssh.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh.c,v >retrieving revision 1.265 >diff -u -p -r1.265 ssh.c >--- ssh.c 22 Feb 2006 00:04:45 -0000 1.265 >+++ ssh.c 26 Feb 2006 01:48:45 -0000 >@@ -1173,9 +1173,10 @@ ssh_session2(void) > static void > load_public_identity_files(void) > { >- char *filename; >+ char *filename, *cp, me[NI_MAXHOST]; > int i = 0; > Key *public; >+ struct passwd *pw; > #ifdef SMARTCARD > Key **keys; > >@@ -1199,9 +1200,17 @@ load_public_identity_files(void) > xfree(keys); > } > #endif /* SMARTCARD */ >+ if ((pw = getpwuid(original_real_uid)) == NULL) >+ fatal("load_public_identity_files: getpwuid failed"); >+ if (gethostname(me, sizeof(me)) == -1) >+ fatal("load_public_identity_files: gethostname: %s", >+ strerror(errno)); > for (; i < options.num_identity_files; i++) { >- filename = tilde_expand_filename(options.identity_files[i], >+ cp = tilde_expand_filename(options.identity_files[i], > original_real_uid); >+ filename = percent_expand(cp, "d", pw->pw_dir, >+ "u", pw->pw_name, "h", me, (char *)NULL); >+ xfree(cp); > public = key_load_public(filename, NULL); > debug("identity file %s type %d", filename, > public ? public->type : -1);
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 1159
:
1076
|
1077
|
1083
|
1097