Commit Graph

36 Commits

Author SHA1 Message Date
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
hubertf
1de6c4ec42 That one needs ctype.h, too (which was removed from the mrouted/defs.h
file for cleanup earlier today)
2007-02-22 01:29:35 +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
dsl
e7df4576bb Add (unsigned char) cast to ctype functions 2004-10-30 08:56:00 +00:00
jmmv
b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
dsl
1f67e2a5fa Match latest mouted code 2003-05-16 23:10:15 +00:00
itojun
761f7bebc3 avoid possible buffer overruns - strlcpy, snprintf 2003-05-16 18:10:37 +00:00
perry
6562f25909 treashold->threshold, from Igor Sobrado in PR misc/20740 2003-03-31 01:34:57 +00:00
wiz
9aeb2c2f6a Add license, from OpenBSD. 2003-03-05 21:59:59 +00:00
wiz
ba718fd8b9 Move back here from gnu/dist/mrinfo now that mrouted license is cleared. 2003-03-05 21:58:20 +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
b77947eeb5 fix an exploitable fd_set overflow in mrinfo(8). drop root priv earlier.
do not use generated printf format string.  from xs@kittenz.org
2002-08-08 00:21:36 +00:00
wiz
fd8d583021 Unifdef __STDC__. Remove __P() and register. ANSIfy. 2002-07-14 16:32:48 +00:00
itojun
a3a7b3dc05 missing memset() for sockaddr. from deraadt 2002-06-02 13:47:02 +00:00
ross
2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +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
itojun
2b18b04c59 updated copyright notice from Xerox. via openbsd 2001-08-01 16:45:28 +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
9bd605c103 Make it compile after format string changes. 2000-10-12 06:03:32 +00:00
is
d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +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
25a12a5eab WARNSify 1997-10-17 11:18:10 +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
mycroft
3d8d046845 Update to mrouted 3.8. 1995-12-10 10:57:11 +00:00
thorpej
f335667d4d New-style RCS ids. 1995-10-03 23:16:47 +00:00
mycroft
c9e578df48 Install this setuid root. 1995-08-13 02:54:30 +00:00
cgd
10603feb51 needs string.h 1995-06-07 17:38:35 +00:00
mycroft
bf70a55f72 Update to multicast 3.5. 1995-06-01 05:19:10 +00:00