|
Lines 1173-1181
ssh_session2(void)
Link Here
|
| 1173 |
static void |
1173 |
static void |
| 1174 |
load_public_identity_files(void) |
1174 |
load_public_identity_files(void) |
| 1175 |
{ |
1175 |
{ |
| 1176 |
char *filename; |
1176 |
char *filename, *cp, me[NI_MAXHOST]; |
| 1177 |
int i = 0; |
1177 |
int i = 0; |
| 1178 |
Key *public; |
1178 |
Key *public; |
|
|
1179 |
struct passwd *pw; |
| 1179 |
#ifdef SMARTCARD |
1180 |
#ifdef SMARTCARD |
| 1180 |
Key **keys; |
1181 |
Key **keys; |
| 1181 |
|
1182 |
|
|
Lines 1199-1207
load_public_identity_files(void)
Link Here
|
| 1199 |
xfree(keys); |
1200 |
xfree(keys); |
| 1200 |
} |
1201 |
} |
| 1201 |
#endif /* SMARTCARD */ |
1202 |
#endif /* SMARTCARD */ |
|
|
1203 |
if ((pw = getpwuid(original_real_uid)) == NULL) |
| 1204 |
fatal("load_public_identity_files: getpwuid failed"); |
| 1205 |
if (gethostname(me, sizeof(me)) == -1) |
| 1206 |
fatal("load_public_identity_files: gethostname: %s", |
| 1207 |
strerror(errno)); |
| 1202 |
for (; i < options.num_identity_files; i++) { |
1208 |
for (; i < options.num_identity_files; i++) { |
| 1203 |
filename = tilde_expand_filename(options.identity_files[i], |
1209 |
cp = tilde_expand_filename(options.identity_files[i], |
| 1204 |
original_real_uid); |
1210 |
original_real_uid); |
|
|
1211 |
filename = percent_expand(cp, "d", pw->pw_dir, |
| 1212 |
"u", pw->pw_name, "h", me, (char *)NULL); |
| 1213 |
xfree(cp); |
| 1205 |
public = key_load_public(filename, NULL); |
1214 |
public = key_load_public(filename, NULL); |
| 1206 |
debug("identity file %s type %d", filename, |
1215 |
debug("identity file %s type %d", filename, |
| 1207 |
public ? public->type : -1); |
1216 |
public ? public->type : -1); |