Bugzilla – Attachment 1097 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]
Improved diff, with dtucker's suggestions
identpercent.diff (text/plain), 1.26 KB, created by
Damien Miller
on 2006-03-12 15:47:48 AEDT
(
hide
)
Description:
Improved diff, with dtucker's suggestions
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2006-03-12 15:47:48 AEDT
Size:
1.26 KB
patch
obsolete
>Index: ssh.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh.c,v >retrieving revision 1.266 >diff -u -p -r1.266 ssh.c >--- ssh.c 12 Mar 2006 04:23:07 -0000 1.266 >+++ ssh.c 12 Mar 2006 04:45:56 -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,18 @@ 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, "l", me, "h", host, >+ "r", options.user, (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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 1159
:
1076
|
1077
|
1083
| 1097