strcpy(a, b); /* a and b are the same size */
with
strncpy(a, b, sizeof(a));
a[sizeof(a)-1] = '\0';
Making the code `correct at a glance'.
Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>
Disallow connections from port numbers <1024 as low port numbers
can only really mean trouble (ftp bounces etc.).
Discussed at length with: Theo de Raadt <deraadt@cvs.openbsd.org>
fd_set, make sure that all descriptors >2 are closed
when we start - otherwise we're asking for a dump in
FD_SET().
Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
when command logging is switched on.
o Display ******** for the authkey for "show auth"
o Document how \P should be used, and document the other chat escapes
while I'm there.
o Make sure the full command is displayed when a compound command
fails - ie, "set novar rubbish" should say "set novar: Invalid command"
rather than "novar: Invalid command"
Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org> (among others)
GCC suppresses the warning for ``standard'' header files, but since the
headers do not come from the ``standard'' place in a ``make world'', GCC
doesn't get it.
etc., so that (this part of) `LIBOWN=... make world' can be run by users
other than root. Actually, use BINOWN instead of LIBOWN, since the files
that we install in /usr/libdata are not libraries, and LIBOWN is not
used for anything else in /usr/libdata.
Rewrote all the rules and cleaned up.
etc., so that (this part of) `LIBOWN=... make world' can be run by users
other than root. Actually, BINOWN instead of LIBOWN, since fonts are not
libraries. Only one owner of (non-setuid) installed files is really
supported.
line is > LINE_LEN (512 bytes), we scribble (*blush*).
Hinted at by: Theo de Raadt <deraadt@cvs.openbsd.org>
Change sprintf(buf, "fixedstring") to strcpy(buf, "fixedstring").
all RTF_WASCLONED routes, and the second removes the
others. This avoids the situation where we've added an
RTF_CLONING route (such as ``default''), created some
clones, then deleted the CLONING route before the
WASCLONED route(s). Without the two passes, we get
errno (not rtm_errno) set to ESRCH when deleting the
WASCLONED route, despite the deletion succeeding !
Also:
Enhance the route operation failure diagnostics.
Make portability #ifdefs a bit more generic.
change from
ioctl(fd, PIOC<foo>, &i);
to
ioctl(fd, PIOC<foo>, i);
This is going from the _IOW to _IO ioctl macro. The kernel, procctl, and
truss must be in synch for it all to work (not doing so will get errors about
inappropriate ioctl's, fortunately). Hopefully I didn't forget anything :).
Validate the peers suggested IP by attempting to make a routing table
entry.
Give up IPCP negotiation if the peer NAKs us with an unusable IP.
Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device.
Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't
want)!!!
Allow up to 200 interface names (was 50) (now that ppp can play server
properly).
Up the version number (1.5 -> 1.6).
Cosmetic:
Log unexpected CCP packets in the CCP log rather than the ERROR log.
Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather
than the ERROR log.
Log failed route additions and deletions with WARN, not TCPIP.
Log the option id and length for unrecognised IPCP options.
Change some .Sq to .Ar in the man page.
Changed lots of %ld's in format strings back to %d. %ld was right
when daddr_t was long, but Lite2 changed daddr_t to int32_t which
is implemented as `int' on i386's.