diff options
author | ume <ume@FreeBSD.org> | 2000-05-14 18:01:05 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2000-05-14 18:01:05 +0000 |
commit | 441daa522ec90674418b4a5c69a11708e78d2c29 (patch) | |
tree | 7665fa93e57a476da42e73e09132eddaf42313ff /libexec/uucpd | |
parent | edb329e5b8385609c144012aa24f16a72beb5b56 (diff) | |
download | FreeBSD-src-441daa522ec90674418b4a5c69a11708e78d2c29.zip FreeBSD-src-441daa522ec90674418b4a5c69a11708e78d2c29.tar.gz |
IPv6 support.
Reviewed by: shin
Diffstat (limited to 'libexec/uucpd')
-rw-r--r-- | libexec/uucpd/uucpd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index eb5c4a5..e914189 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -83,9 +83,9 @@ static const char rcsid[] = #define SCPYN(a, b) strncpy(a, b, sizeof (a)) -struct sockaddr_in hisctladdr; +struct sockaddr_storage hisctladdr; int hisaddrlen = sizeof hisctladdr; -struct sockaddr_in myctladdr; +struct sockaddr_storage myctladdr; int mypid; char Username[64], Logname[64]; @@ -97,10 +97,10 @@ char *nenv[] = { extern char **environ; extern void logwtmp(char *line, char *name, char *host); -void doit(struct sockaddr_in *sinp); +void doit(struct sockaddr *sinp); void dologout(void); int readline(char start[], int num, int passw); -void dologin(struct passwd *pw, struct sockaddr_in *sin); +void dologin(struct passwd *pw, struct sockaddr *sin); int main(int argc, char **argv) { @@ -113,16 +113,16 @@ int main(int argc, char **argv) syslog(LOG_ERR, "getpeername: %m"); _exit(1); } - doit(&hisctladdr); + doit((struct sockaddr *)&hisctladdr); dologout(); exit(0); } -void badlogin(char *name, struct sockaddr_in *sin) +void badlogin(char *name, struct sockaddr *sin) { char remotehost[MAXHOSTNAMELEN]; - realhostname(remotehost, sizeof(remotehost) - 1, &sin->sin_addr); + realhostname_sa(remotehost, sizeof(remotehost) - 1, sin, sin->sa_len); remotehost[sizeof(remotehost) - 1] = '\0'; syslog(LOG_NOTICE, "LOGIN FAILURE FROM %s", remotehost); @@ -133,7 +133,7 @@ void badlogin(char *name, struct sockaddr_in *sin) exit(1); } -void doit(struct sockaddr_in *sinp) +void doit(struct sockaddr *sinp) { char user[64], passwd[64]; char *xpasswd, *crypt(); @@ -240,14 +240,14 @@ void dologout(void) /* * Record login in wtmp file. */ -void dologin(struct passwd *pw, struct sockaddr_in *sin) +void dologin(struct passwd *pw, struct sockaddr *sin) { char line[32]; char remotehost[UT_HOSTSIZE + 1]; int f; time_t cur_time; - realhostname(remotehost, sizeof remotehost - 1, &sin->sin_addr); + realhostname_sa(remotehost, sizeof(remotehost) - 1, sin, sin->sa_len); remotehost[sizeof remotehost - 1] = '\0'; /* hack, but must be unique and no tty line */ |