Commit Graph

32 Commits

Author SHA1 Message Date
perry
36c7456d7c include sys/cdefs.h so that __attribute__ can be fixed later 2007-12-15 16:32:05 +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
hubertf
64cd915703 Pull in ctype.h after it was removed from 'defs.h' in previous commit
to src/usr.sbin/mrouted.
2007-02-22 01:25:13 +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
f7571bacc2 Add (unsigned char) cast to ctype functions 2004-10-30 08:46:12 +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
itojun
405a7327c7 fix strncat too. from wiz 2003-05-17 13:56:41 +00:00
itojun
4fb82a79ed strlcpy 2003-05-17 00:46:04 +00:00
itojun
7bd6640a6d strlcat 2003-05-17 00:44:49 +00:00
dsl
d26eb4f4c2 Make this comple with modified mrouted sources. 2003-05-16 23:00:29 +00:00
wiz
d67d82e27f Add license, from OpenBSD. 2003-03-05 21:56:26 +00:00
wiz
b22b38318c Move back here from gnu/dist/map-mbone now the mrouted license is cleared. 2003-03-05 21:55:51 +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
478dc25d0a select() -> poll() 2002-09-19 03:31:19 +00:00
itojun
17110be88b die if fd_set overrun. (they're not setuid binary so it is not that critical) 2002-08-09 02:17:26 +00:00
wiz
279bdef494 Unifdef __STDC__. ANSIfy. Remove __P(). 2002-07-14 15:34:58 +00:00
itojun
a3a7b3dc05 missing memset() for sockaddr. from deraadt 2002-06-02 13:47:02 +00:00
wiz
aaba2b6d8a Whitespace nits. 2002-01-19 03:26:30 +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
is
d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +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
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
03bc7e4381 Update to multicast 3.5. 1995-06-01 05:32:11 +00:00