Commit Graph

70 Commits

Author SHA1 Message Date
dyoung 1ebd488e32 #include <stdbool.h> for bool. 2008-01-21 20:46:58 +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
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
elad 1232ea27c4 PR/18906: roskens at elfin dot net: misc. select() to poll() updates.
Adapted to -current by myself, thanks for the patch!
2006-10-07 17:27:57 +00:00
rpaulo 024ed52e7d Add missing #endif. 2006-05-25 02:40:58 +00:00
rpaulo 4264348cac Beautify. 2006-05-25 02:35:50 +00:00
rpaulo 3a387eb457 Time to remove __P(). 2006-05-25 02:32:56 +00:00
rpaulo d5c00ee8c6 Now it uses the RFC 3542 API. 2006-05-25 02:21:59 +00:00
christos f5e466e11a Coverity CID 2537: Avoid double free, and random free. how did this work? 2006-05-25 02:05:40 +00:00
christos e86e72d9a8 Coverity CID 3194: Avoid NULL deref. 2006-05-25 02:01:40 +00:00
christos 180ca89a2b Coverity CID 3195: ifdef out dead code. 2006-05-25 01:58:39 +00:00
wiz 1ad8067cb3 Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
2006-02-25 00:58:34 +00:00
hannken 101f03a0d5 Let it compile again on sparc/sparc64. 2003-10-31 10:09:55 +00:00
itojun 91ba57dca7 need_trigger/idx should be u_int. millert@openbsd 2003-10-31 00:31:53 +00:00
itojun 4101558b6e validate packet length. KAME-PR-517 2003-10-30 08:46:04 +00:00
itojun 0c4a8b5a7e realloc pedant 2003-09-19 06:01:24 +00:00
wiz 47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
itojun c66d2bd6ee Don't age non-gateway host routes. PR bin/22568 from Andrew White 2003-08-22 08:24:26 +00:00
itojun 47c9fbf29d port numbers are unsigned. use %u. from kame 2003-04-22 09:56:30 +00:00
itojun c2a20cc150 %d is not 10 chars, but 12 chars. uwse NI_MAXSERV. sync w/ kame. from openbsd 2003-04-15 07:23:19 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
itojun 41b5d4f9af use strtoul, not atoi.
don't print strerrno() if errno == 0 on fatal().
sync w/kame
2002-10-26 20:10:02 +00:00
itojun 88b96862d4 IPV6_V6ONLY setsockopt has to happen before bind(2). PR 18435 2002-09-27 14:43:00 +00:00
itojun 2eca5c16aa set IPV6_V6ONLY to 1. 2002-09-24 13:48:14 +00:00
mycroft aae6c28cf9 null commit 2002-09-23 12:44:34 +00:00
itojun 3ca6603d44 sys/poll.h -> poll.h
reduce diff w/ kame tree.
2002-09-20 22:04:31 +00:00
mycroft a5f0bfc173 Set fd of unused pollfd entries to -1. 2002-09-20 19:51:33 +00:00
mycroft 562704fd8f select() -> poll() 2002-09-20 13:30:18 +00:00
itojun 9e8e6611e8 suppress output on dump request if -q is specified. sync w/kame 2002-08-21 16:26:12 +00:00
wiz a1b3869d7e Unifdef __STDC__, ansify. 2002-08-01 00:17:31 +00:00
itojun db47036241 use strchr 2002-06-09 02:47:03 +00:00
itojun f78cc67c13 avoid fd_set overrun. sync w/kame 2002-06-07 16:45:30 +00:00
wiz ce2e5815e6 Wording and grammar improvements. 2002-06-02 14:56:47 +00:00
itojun ef188effbf strlcpy. rtm_seq is an int. use pidfile(3). sync w/kame via openbsd 2002-05-29 23:11:13 +00:00
itojun 8e96646992 do not age global address on loopback interface. sync with kame 2002-02-25 02:22:59 +00:00
itojun 4a1ad619af daemon(3) has to be called before opening file descriptors.
noticed by markus@openbsd, sync with kame
2002-01-11 04:20:55 +00:00
itojun 3e54083fa3 __ss_{len,family} hack is no longer necessary 2001-11-19 03:19:10 +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 a12c72c978 sync with the latest KAME tree.
- don't use FD_SETSIZE on select
- "sin" conflicts with math library, so use sin6
- other minor updates
2001-09-05 01:17:31 +00:00
itojun a167adffce need va_start/end for every vfprintf(). from markus@openbsd. sync with kame 2001-06-13 04:31:52 +00:00
kleink a0649bd297 getopt(3): EOF -> -1. 2001-05-07 14:00:22 +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
itojun ac2d37627a correct delroute() against host routes. clarify ROUTE6D p2p advert behavior
(no behavior change for normal use).  sync with kame
2001-03-08 03:24:47 +00:00
itojun 0a7bed1113 bring in latest kame code.
- correct RTA_NETMASK processing
- correct -A filter behavior (do not advert aggregated route to other if)
- better signal handling
- mandate getifaddrs
- do not advert connected routes on !IFF_UP routes.  experimental
sync with kame
2001-02-07 13:46:04 +00:00
pk 39ca30e495 setindex2ifc(): after a realloc(), zero the newly acquired entries. 2001-02-07 13:24:42 +00:00
itojun 606c47534d make signo a volatile variable. sync with kame 2001-01-12 17:48:37 +00:00
itojun 5e43f4d020 make signal handler very short, to avoid possibility of race conditions.
commented by deraadt.  sync with kame
2001-01-12 14:55:13 +00:00
itojun 980886f151 do not advertise dynamic/cloned routes 2000-11-10 18:15:57 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
itojun ecb9f85737 cast size_t to u_long on printing. sync with kame 2000-10-10 13:03:27 +00:00