X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-aix4.c;h=e797c54e5f5ed1e63dbb3ead91ddb63e6839df27;hb=ab7cff041f1b8054ae5691df236fe18c1d23bfe6;hp=9c92e3ffb565126a50cf68e6d4bc830285d20b1d;hpb=ee9e29919a9c98b9c9b3805ebe9e975a9d143d73;p=ppp.git diff --git a/pppd/sys-aix4.c b/pppd/sys-aix4.c index 9c92e3f..e797c54 100644 --- a/pppd/sys-aix4.c +++ b/pppd/sys-aix4.c @@ -21,7 +21,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-aix4.c,v 1.17 1999/03/16 22:53:46 paulus Exp $"; +static char rcsid[] = "$Id: sys-aix4.c,v 1.19 1999/03/19 04:23:46 paulus Exp $"; #endif /* @@ -111,7 +111,7 @@ sys_cleanup() struct ifreq ifr; if (if_is_up) { - strlcpy(ifr.ifr_name, sizeof(ifr.ifr_name), ifname); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) >= 0 && ((ifr.ifr_flags & IFF_UP) != 0)) { ifr.ifr_flags &= ~IFF_UP; @@ -581,7 +581,8 @@ wait_input(timo) /* * add_fd - add an fd to the set that wait_input waits for. */ -void add_fd(int fd) +void add_fd(fd) + int fd; { int n; @@ -599,7 +600,8 @@ void add_fd(int fd) /* * remove_fd - remove an fd from the set that wait_input waits for. */ -void remove_fd(int fd) +void remove_fd(fd) + int fd; { int n; @@ -664,7 +666,7 @@ ppp_send_config(unit, mtu, asyncmap, pcomp, accomp) int c; struct ifreq ifr; - strlcpy(ifr.ifr_name, sizeof (ifr.ifr_name), ifname); + strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); ifr.ifr_mtu = mtu; if (ioctl(sockfd, SIOCSIFMTU, (caddr_t) &ifr) < 0) fatal("ioctl(SIOCSIFMTU): %m"); @@ -805,7 +807,7 @@ sifup(u) { struct ifreq ifr; - strlcpy(ifr.ifr_name, sizeof (ifr.ifr_name), ifname); + strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { error("ioctl (SIOCGIFFLAGS): %m"); return 0; @@ -857,7 +859,7 @@ sifdown(u) ioctl(ttyfd, SIOCSETNPMODE, &npi); /* ignore errors, because ttyfd might have been closed by now. */ - strlcpy(ifr.ifr_name, sizeof (ifr.ifr_name), ifname); + strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) { error("ioctl (SIOCGIFFLAGS): %m"); rv = 0; @@ -891,7 +893,7 @@ sifaddr(u, o, h, m) struct ifreq ifr; ret = 1; - strlcpy(ifr.ifr_name, sizeof (ifr.ifr_name), ifname); + strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); SET_SA_FAMILY(ifr.ifr_addr, AF_INET); if (m != 0) { info("Setting interface mask to %s\n", ip_ntoa(m)); @@ -1259,7 +1261,7 @@ GetMask(addr) /* * Check that the interface is up, and not point-to-point or loopback. */ - strlcpy(ifreq.ifr_name, sizeof(ifreq.ifr_name), ifr->ifr_name); + strlcpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, &ifreq) < 0) continue; if ((ifreq.ifr_flags & (IFF_UP|IFF_POINTOPOINT|IFF_LOOPBACK)) @@ -1289,9 +1291,9 @@ logwtmp(line, name, host) if ((fd = open(WTMPFILE, O_WRONLY|O_APPEND, 0)) < 0) return; if (!fstat(fd, &buf)) { - strlcpy(ut.ut_line, sizeof(ut.ut_line), line); - strlcpy(ut.ut_name, sizeof(ut.ut_name), name); - strlcpy(ut.ut_host, sizeof(ut.ut_host), host); + strlcpy(ut.ut_line, line, sizeof(ut.ut_line)); + strlcpy(ut.ut_name, name, sizeof(ut.ut_name)); + strlcpy(ut.ut_host, host, sizeof(ut.ut_host)); (void)time(&ut.ut_time); if (write(fd, (char *)&ut, sizeof(struct utmp)) != sizeof(struct utmp)) (void)ftruncate(fd, buf.st_size);