|
Lines 1270-1275
do_known_hosts(struct passwd *pw, const
Link Here
|
| 1270 |
int r, fd, oerrno, inplace = 0; |
1270 |
int r, fd, oerrno, inplace = 0; |
| 1271 |
struct known_hosts_ctx ctx; |
1271 |
struct known_hosts_ctx ctx; |
| 1272 |
u_int foreach_options; |
1272 |
u_int foreach_options; |
|
|
1273 |
struct stat sb; |
| 1273 |
|
1274 |
|
| 1274 |
if (!have_identity) { |
1275 |
if (!have_identity) { |
| 1275 |
cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid); |
1276 |
cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid); |
|
Lines 1279-1284
do_known_hosts(struct passwd *pw, const
Link Here
|
| 1279 |
free(cp); |
1280 |
free(cp); |
| 1280 |
have_identity = 1; |
1281 |
have_identity = 1; |
| 1281 |
} |
1282 |
} |
|
|
1283 |
if (stat(identity_file, &sb) != 0) |
| 1284 |
fatal("Cannot stat %s: %s", identity_file, strerror(errno)); |
| 1282 |
|
1285 |
|
| 1283 |
memset(&ctx, 0, sizeof(ctx)); |
1286 |
memset(&ctx, 0, sizeof(ctx)); |
| 1284 |
ctx.out = stdout; |
1287 |
ctx.out = stdout; |
|
Lines 1305-1310
do_known_hosts(struct passwd *pw, const
Link Here
|
| 1305 |
unlink(tmp); |
1308 |
unlink(tmp); |
| 1306 |
fatal("fdopen: %s", strerror(oerrno)); |
1309 |
fatal("fdopen: %s", strerror(oerrno)); |
| 1307 |
} |
1310 |
} |
|
|
1311 |
fchmod(fd, sb.st_mode & 0644); |
| 1308 |
inplace = 1; |
1312 |
inplace = 1; |
| 1309 |
} |
1313 |
} |
| 1310 |
/* XXX support identity_file == "-" for stdin */ |
1314 |
/* XXX support identity_file == "-" for stdin */ |