View | Details | Raw Unified | Return to bug 1414
Collapse All | Expand All

(-)../openssh-4.4p1.orig/ssh.c (-2 / +7 lines)
Lines 1227-1232 Link Here
1227
	int i = 0;
1227
	int i = 0;
1228
	Key *public;
1228
	Key *public;
1229
	struct passwd *pw;
1229
	struct passwd *pw;
1230
	char *pw_dir, *pw_name;
1230
#ifdef SMARTCARD
1231
#ifdef SMARTCARD
1231
	Key **keys;
1232
	Key **keys;
1232
1233
Lines 1252-1265 Link Here
1252
#endif /* SMARTCARD */
1253
#endif /* SMARTCARD */
1253
	if ((pw = getpwuid(original_real_uid)) == NULL)
1254
	if ((pw = getpwuid(original_real_uid)) == NULL)
1254
		fatal("load_public_identity_files: getpwuid failed");
1255
		fatal("load_public_identity_files: getpwuid failed");
1256
	pw_dir = xstrdup (pw->pw_dir);
1257
	pw_name = xstrdup (pw->pw_name);
1255
	if (gethostname(thishost, sizeof(thishost)) == -1)
1258
	if (gethostname(thishost, sizeof(thishost)) == -1)
1256
		fatal("load_public_identity_files: gethostname: %s",
1259
		fatal("load_public_identity_files: gethostname: %s",
1257
		    strerror(errno));
1260
		    strerror(errno));
1258
	for (; i < options.num_identity_files; i++) {
1261
	for (; i < options.num_identity_files; i++) {
1259
		cp = tilde_expand_filename(options.identity_files[i],
1262
		cp = tilde_expand_filename(options.identity_files[i],
1260
		    original_real_uid);
1263
		    original_real_uid);
1261
		filename = percent_expand(cp, "d", pw->pw_dir,
1264
		filename = percent_expand(cp, "d", pw_dir,
1262
		    "u", pw->pw_name, "l", thishost, "h", host,
1265
		    "u", pw_name, "l", thishost, "h", host,
1263
		    "r", options.user, (char *)NULL);
1266
		    "r", options.user, (char *)NULL);
1264
		xfree(cp);
1267
		xfree(cp);
1265
		public = key_load_public(filename, NULL);
1268
		public = key_load_public(filename, NULL);
Lines 1269-1274 Link Here
1269
		options.identity_files[i] = filename;
1272
		options.identity_files[i] = filename;
1270
		options.identity_keys[i] = public;
1273
		options.identity_keys[i] = public;
1271
	}
1274
	}
1275
	xfree(pw_dir);
1276
	xfree(pw_name);
1272
}
1277
}
1273
1278
1274
static void
1279
static void

Return to bug 1414