Commit Graph

171 Commits

Author SHA1 Message Date
christos
b935e079cd fix printf formats. 2008-12-28 20:15:21 +00:00
lukem
6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
ragge
b531488dbc __attribute -> __attribute__. 2007-09-16 18:42:02 +00:00
dyoung
4287175475 Don't nul-terminate the interface name in a sockaddr_dl that is
part of an ifa_msghdr returned by sysctl(3), because that could
overwrite the ifam_len field of the following ifa_msgher.  Instead,
copy the interface name out of the sockaddr_dl, and then nul-terminate.
Fixes the bug reported by Frank Kardel on current-users@.  Thanks
Frank for reporting, and for testing the fix.
2007-08-14 03:39:19 +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
084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
mrg
bc2e62d3b8 change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:30:15 +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
christos
9a02e676ef Coverity CID 1301: Return early if we could not open /dev/null 2006-03-22 02:23:11 +00:00
christos
aa1540d7a7 Coverity CID 2742: Avoid NULL deref. 2006-03-21 21:50:44 +00:00
christos
55303a4a4b Coverity CID 2307: Possible memory leak. 2006-03-18 20:25:28 +00:00
christos
f04c9de45b Coverity CID 2306: Possible memory leak. 2006-03-18 20:23:51 +00:00
christos
5ac5bc844b Coverity CID 1079: Possible NULL deref. 2006-03-18 20:21:50 +00:00
christos
704b63146c Coverity CID 1080: Possible NULL deref. 2006-03-18 20:20:31 +00:00
christos
6672211d0f Coverity CID 2432: Dereference before NULL check. 2006-03-18 19:55:49 +00:00
christos
2044d4f590 Coverity CID 2671: Fix use of ifp after free. 2006-03-17 16:58:09 +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
christos
2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
xtraeme
4ad9c5a867 Kill __P(). 2005-02-05 13:47:19 +00:00
mycroft
fc82ea195f PR 9431: if rnh_addradd() fails, total_routes will be wrong. 2004-07-06 23:36:24 +00:00
wiz
de7136f83b usage: -F was missing the /mask part. Based on PR 26063
by Kouichirou Hiratsuka.
2004-07-06 16:43:18 +00:00
wiz
a63a57aa28 Remove unimplemented and undescribed -p option from usage and man page
SYNOPSIS. Noted by Jeff Ito.
2004-05-17 15:38:20 +00:00
wiz
0a1db66278 Remove option letter from getopt string, since it does not
have a case handler below. From aaron@openbsd.
2004-05-13 00:18:46 +00:00
christos
f29f4783da constification lossage (hi gimpy) 2004-04-21 19:01:17 +00:00
christos
7ed7713848 From Vernon Schryver:
Wolfgang Solfrank has explained the problem with router discovery
in `routed` in a way I can understand.

Let's assume that the configured preference of the interface is 5.
This gets converted to 0x80000005 through the use of the UNSIGN_PREF
macro.  Later on, this value gets put into the PREF macro, which
compares it against the interface metric(s) (let's assume those
values to be 0 for now).  Of course the 0x80000005, cast to int,
is much less than 0, so the clamping rule is triggered, which
gives us a value of 1.  This is then converted via SIGN_PREF into
0x80000001 and put into the message.  Certainly, this isn't what
was intended.
2004-03-27 20:50:43 +00:00
enami
b3f1752123 Initialize an uninitialized variable. 2003-11-14 01:31:24 +00:00
wiz
bc0e64144c Correct error in previous, noted by Nick Hudson. 2003-09-23 12:14:49 +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
d9be8318c9 avoid FD_SET overrun. from openbsd 2003-08-13 08:51:05 +00:00
itojun
efb986d740 sprintf can return negative 2003-07-12 14:36:07 +00:00
itojun
e97be76fa1 strcat -> strlcat 2003-07-03 03:04:04 +00:00
itojun
16435cdb98 strcpy/sprintf cleanup. from openbsd 2003-04-21 08:54:42 +00:00
itojun
3fbac68bea use snprintf. there are more... 2003-04-15 08:20:17 +00:00
itojun
64e132e781 array seems too small 2003-04-15 07:37:34 +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
wiz
cb647c5704 Sort sections, new sentences begin on new lines, add a missing line,
fix a typo.
2002-12-18 19:20:05 +00:00
thorpej
cd81fc31ea Avoid strict alias warnings. 2002-12-06 02:18:37 +00:00
agc
19cc8c4892 Fix compilation problems on non-i386. 2002-12-01 08:19:48 +00:00
christos
f93fe60ac0 sync with routed 2.27 2002-11-30 04:04:23 +00:00
wiz
09cbac4e7f New sentence, new line. From Robert Elz. 2002-10-03 15:41:44 +00:00
itojun
e93a4e6b0f bitmask operation mistake audit (s/&&/&/). from openbsd 2002-08-08 15:10:51 +00:00
wiz
d30d25dc1a Spelling fixes, from Sergey Svishchev in kern/16650. 2002-05-12 15:48:36 +00:00
msaitoh
039616e700 don't override LDSTATIC if NOPIC is defined. 2002-04-23 08:19:15 +00:00
ross
dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz
65c4d36952 Use mdoc macros instead of man ones. 2002-01-21 18:23:09 +00:00
wiz
49e6214ed8 Punctuation fix, sort sections, lose a .Pp. 2001-11-16 12:09:19 +00:00
wiz
bb03964e95 Sort SEE ALSO. 2001-11-16 11:31:30 +00:00
lukem
cbbd79f700 fix -Wshadow warnings 2001-11-02 05:30:56 +00:00