Commit Graph

46 Commits

Author SHA1 Message Date
lukem c83cfc0c59 Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare) 2009-04-17 16:12:46 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
mrg 0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
wiz 5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
dsl 3ab2c084c9 Add (unsigned char) cast to ctype functions 2004-10-30 14:31:45 +00:00
itojun 9beba21754 ignore non-AF_INET addrs. from openbsd 2003-09-23 10:50:51 +00:00
itojun e2c411ce3c use arc4random 2003-09-06 12:42:00 +00:00
itojun cdf8146ccf SIOCGIFCONF->getifaddrs conversion 2003-08-17 22:12:43 +00:00
dsl da0369cc40 Match latest mrouted source. 2003-05-16 23:24:38 +00:00
itojun 761f7bebc3 avoid possible buffer overruns - strlcpy, snprintf 2003-05-16 18:10:37 +00:00
wiz 22c010e66d Update license, from OpenBSD. 2003-03-05 22:04:59 +00:00
wiz e6f08c9f93 Move back here from gnu/dist/mtrace now that mrouted license is cleared. 2003-03-05 22:02:03 +00:00
itojun c3cbda0efb move mbone tools out of basesrc, as they use part of mrouted 2002-10-01 03:50:07 +00:00
itojun 4adeccac17 fix .PATH to mrouted 2002-10-01 03:40:31 +00:00
mycroft aae6c28cf9 null commit 2002-09-23 12:44:34 +00:00
itojun f46e921837 poll.h, not sys/poll.h 2002-09-23 03:36:03 +00:00
mycroft 05abee23d9 select() -> poll(), nanosleep() 2002-09-19 16:45:57 +00:00
itojun 258ffca8eb one more indentation fix 2002-08-09 02:09:25 +00:00
itojun 93a39a493f more consistent indentation 2002-08-09 02:09:01 +00:00
itojun 31f93ffa75 revoke root priv earlier. check fd_set overrun (and die if overrun).
avoid using runtime-generated printf format string.  from xs@kittenz.org
2002-08-09 02:04:03 +00:00
wiz e58b7d4682 ANSIfy. Remove ifndef __STDC__. Remove __P(). 2002-07-14 01:01:10 +00:00
itojun a3a7b3dc05 missing memset() for sockaddr. from deraadt 2002-06-02 13:47:02 +00:00
wiz a2d753e3ef Whitespace nits. 2002-01-19 11:44:57 +00:00
wiz 4c99916337 va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
2001-09-24 13:22:25 +00:00
wiz 14dbdf5518 Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.
2001-04-06 11:13:45 +00:00
augustss 43851beb31 Make it compile again after format string changes. 2000-10-12 06:11:40 +00:00
is d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
mycroft f5d7100e26 Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
2000-01-21 17:08:33 +00:00
kristerw 2220c68654 Typos (from OpenBSD) 1999-11-18 19:02:31 +00:00
he d0c388761b Don't print trailing spaces if there are no flag value to print. 1999-05-23 16:15:18 +00:00
he 8344625106 Apply patches for mtrace in bin/5598 by yours truly.
This adds decoding of more error and result codes when tracing through
cisco routers running PIM and/or MBGP.
1999-01-14 21:54:10 +00:00
ross 5b1f2d4c8c Add {} pairs to shut up egcs. 1998-08-27 18:03:42 +00:00
mrg 5b9ccc383d use destination's size in 2 memcpy calls. 1998-07-04 21:31:59 +00:00
kleink 37bede84a4 Use strerror(3) instead of sys_errlist and sys_nerr. 1998-05-09 17:22:07 +00:00
lukem 0a94f4f077 use CPPFLAGS instead of CFLAGS 1997-10-25 06:57:53 +00:00
lukem cb37f89394 WARNSify 1997-10-17 11:25:37 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
mrg a9437d1189 be safe with buffers. 1997-04-13 13:36:46 +00:00
thorpej 89ed0166fe Change a rogue RCS id to new-style 1995-12-16 20:11:45 +00:00
mycroft 3d8d046845 Update to mrouted 3.8. 1995-12-10 10:57:11 +00:00
thorpej c57984e13a New-style RCS ids. 1995-10-04 03:47:51 +00:00
thorpej c381c611ec Make the behavior of `-s' consistent. 1995-06-02 01:02:09 +00:00
thorpej 9cf337c39b Install this setuid-root. 1995-06-01 23:38:51 +00:00
thorpej 9d50339841 Lots of things; use getopt(), make `-i ...' work, others. 1995-06-01 23:27:00 +00:00
mycroft 01207e9c90 Update to multicast 3.5. 1995-06-01 05:45:27 +00:00