|
Lines 505-511
main(int ac, char **av)
Link Here
|
| 505 |
{ |
505 |
{ |
| 506 |
int i, r, opt, exit_status, use_syslog, config_test = 0; |
506 |
int i, r, opt, exit_status, use_syslog, config_test = 0; |
| 507 |
char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile; |
507 |
char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile; |
| 508 |
char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; |
508 |
char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV], |
|
|
509 |
uidstr[11]; |
| 509 |
char cname[NI_MAXHOST]; |
510 |
char cname[NI_MAXHOST]; |
| 510 |
struct stat st; |
511 |
struct stat st; |
| 511 |
struct passwd *pw; |
512 |
struct passwd *pw; |
|
Lines 1122-1127
main(int ac, char **av)
Link Here
|
| 1122 |
strlcpy(shorthost, thishost, sizeof(shorthost)); |
1123 |
strlcpy(shorthost, thishost, sizeof(shorthost)); |
| 1123 |
shorthost[strcspn(thishost, ".")] = '\0'; |
1124 |
shorthost[strcspn(thishost, ".")] = '\0'; |
| 1124 |
snprintf(portstr, sizeof(portstr), "%d", options.port); |
1125 |
snprintf(portstr, sizeof(portstr), "%d", options.port); |
|
|
1126 |
snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid); |
| 1125 |
|
1127 |
|
| 1126 |
if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL || |
1128 |
if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL || |
| 1127 |
ssh_digest_update(md, thishost, strlen(thishost)) < 0 || |
1129 |
ssh_digest_update(md, thishost, strlen(thishost)) < 0 || |
|
Lines 1164-1169
main(int ac, char **av)
Link Here
|
| 1164 |
"p", portstr, |
1166 |
"p", portstr, |
| 1165 |
"r", options.user, |
1167 |
"r", options.user, |
| 1166 |
"u", pw->pw_name, |
1168 |
"u", pw->pw_name, |
|
|
1169 |
"i", uidstr, |
| 1167 |
(char *)NULL); |
1170 |
(char *)NULL); |
| 1168 |
free(cp); |
1171 |
free(cp); |
| 1169 |
} |
1172 |
} |