Commit Graph

84 Commits

Author SHA1 Message Date
plunky
9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
joerg
bec77c5f43 Use __dead 2011-08-31 13:32:36 +00:00
joerg
a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
dyoung
6c185a0be8 Don't use bool as a variable name.
Remove a bunch of parameter names form function prototypes.
2011-02-23 01:23:03 +00:00
lukem
58cb611abb Fix WARNS=4 (-Wshadow -Wsign-compare -Wcast-qual) 2009-04-17 16:05:43 +00:00
joerg
70f96e3d54 Fix markup. 2009-03-15 10:09:29 +00:00
seanb
86b8382bbc - Clean up warnings / errors. 2008-08-26 17:38:21 +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
b5f80fa241 Move ctype.h header from defs.h to main.c where it's really used
From: Slava Semushin <slava.semushin@gmail.com>
2007-02-21 21:01:10 +00:00
christos
d8050237b6 Coverity CID 1188: Don't check for NULL just to log and then die
de-referencing; return instead.
2006-05-25 01:44:28 +00:00
christos
4aafa6340a Coverity CID 1189, 1190: Don't check for NULL just to log and then die
de-referencing; return instead.
2006-05-25 01:43:58 +00:00
christos
6388d5cc98 Coverity CID 1191, 1192: Don't check for NULL allocation, just to log it
and then die dereferencing. Return instead.
2006-05-25 01:41:13 +00:00
christos
43c323928f Coverity CID 2718: Avoid using free'd memory. 2006-05-25 01:38:41 +00:00
mrg
3479c0a6a2 can't fit "256" in an 8bit value, don't have a switch case for it. 2006-05-12 01:27:27 +00:00
mrg
2a5124235b if we are going to cast the 3rd argument to accept_info_request(),
use the right type.
2006-05-11 21:17:02 +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
wiz
47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
itojun
e2c411ce3c use arc4random 2003-09-06 12:42:00 +00:00
itojun
757e458559 SIOCGIFCONF -> getifaddrs conversion 2003-08-18 05:39:52 +00:00
itojun
b98c10dfbb strdup is simpler 2003-07-13 12:40:17 +00:00
itojun
b37b18f113 remove obsolete comment 2003-05-17 19:19:50 +00:00
dsl
35605a88c0 A slightly better inet_parse(), tested in isolation. 2003-05-17 09:39:04 +00:00
dsl
ee70b5d6af Revert previous change. Remove s parameter from teh function and rotate
the result through a fixed set of strings instead.
There never was a possibility of a buffer overrun in inet_fmt{s}().
Fix an actual buffer overrun in a scanf() call.
2003-05-16 22:59:50 +00:00
itojun
761f7bebc3 avoid possible buffer overruns - strlcpy, snprintf 2003-05-16 18:10:37 +00:00
fvdl
2130087152 This seems to need a -I${.CURDIR} these days. 2003-03-07 01:06:05 +00:00
wiz
7f3982ff72 Add RCS Id; new sentence, new line; at least one mdoc fix; sort sections. 2003-03-05 21:48:59 +00:00
wiz
6b7e50194b mdocified man page from mpech@openbsd.org 2003-03-05 21:40:08 +00:00
wiz
2dd997ff9e ANSIfy one more. 2003-03-05 21:32:51 +00:00
wiz
ff2bebb731 Use vsnprintf instead of vsprintf. From OpenBSD. 2003-03-05 21:15:18 +00:00
wiz
b4cca63351 Add license (from Xerox), from OpenBSD. 2003-03-05 21:12:26 +00:00
wiz
f74dd12ce6 License update from Stanford, via OpenBSD. 2003-03-05 21:07:14 +00:00
wiz
c60d41a9de Move back from gnu/dist/mrouted, now that it's available under a BSD
license.
2003-03-05 21:05:38 +00:00
itojun
9bbfbbb676 move mrouted out of basesrc, as it carries non-BSD license.
agreed w/ core.
2002-10-01 03:30:50 +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
itojun
2f26267778 ifa->ifa_addr is already pointer, no need for "&". from love 2002-08-01 23:47:46 +00:00
itojun
43cad3fc3f use getifaddrs, not SIOCGIFCONF. should fix PR12578 2002-08-01 14:04:50 +00:00
itojun
a297f25294 avoid issues with typecast optimization (taking advantage of pointer aliasing),
which results in incorrect igmp checksum.
confirmed by taca@netbsd
2002-08-01 08:33:14 +00:00
itojun
896f6ff227 u_short cleansing (should be u_int16_t) 2002-08-01 03:40:34 +00:00
wiz
51c0807f60 Unifdef __STDC__. Remove __P(). Remove register. ANSIfy. 2002-07-14 16:30:41 +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
483f92284e Whitespace nits. 2002-01-19 03:39:46 +00:00
itojun
de2695eefc copyright clarification. via openbsd 2001-08-02 03:41:42 +00:00
wiz
0a600be867 receive, not recieve 2001-06-12 15:17:10 +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
8ca6dec6ba Make it compile again after format string changes (this change was obviously
never tested).
2000-10-12 06:07:04 +00:00
is
d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
matt
3ab02a8704 More #include <stdlib.h> string, etc. cleanup 2000-07-04 20:27:35 +00:00
soren
89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00