NetBSD/sbin
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
..
amrctl Drop trailing whitespace. 2006-07-23 13:23:12 +00:00
apmlabel Sort options. Bump date. 2007-05-19 14:23:25 +00:00
atactl add missing initializers 2006-10-16 00:45:19 +00:00
badsect Move WARNS=3 to the Makefile.inc, and add a little const to the remaining 2005-06-27 01:00:04 +00:00
bim One "const" is enough... 2006-09-04 01:20:44 +00:00
bioctl Remove an extra comma. 2007-05-07 11:02:21 +00:00
brconfig Bump date for previous. 2007-01-08 07:22:12 +00:00
ccdconfig Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
cgdconfig Add a DIAGNOSTICS section and explain that the error message "could not 2007-02-23 20:00:04 +00:00
chkconfig Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
clri sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
disklabel Remove defunct B from getopt string. 2007-04-12 18:41:23 +00:00
dkctl fix typo 2006-06-17 02:16:19 +00:00
dkscan_bsdlabel Use CPPFLAGS, not COPTS, and ${NETBSDSRCDIR}, not "../..". This 2007-03-02 04:03:17 +00:00
dmesg c99 initializer 2006-10-16 02:43:19 +00:00
drvctl drvctl 4 does not exist. 2007-03-10 20:32:26 +00:00
dump Convert a couple of "(void)&" constructs to volatile. 2006-12-18 20:07:32 +00:00
dump_lfs Call fcntl on the file descriptor *before* closing it. 2006-09-28 23:23:01 +00:00
edlabel use c99 initialisers. 2006-10-23 03:56:38 +00:00
fastboot Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
fdisk Plural fix. 2007-05-20 22:27:46 +00:00
fsck Cross-reference fsck_lfs and fsck_ext2fs. 2007-02-23 19:32:16 +00:00
fsck_ext2fs include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
fsck_ffs apply revision 1.31 yet again: 2007-04-12 05:19:18 +00:00
fsck_lfs include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
fsck_msdos Change mismatch of bytes 11 to 90 to be a warning, not an error, and 2007-03-19 18:30:40 +00:00
fsdb Remove unused ctype.h 2007-03-10 01:16:17 +00:00
fsirand include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
gpt Use strtoll() when converting a 64-bit quantity. This makes "gpt add" 2007-02-16 17:13:02 +00:00
ifconfig Don't try to convert numbers to names for either endpoint of a 2007-03-26 05:02:44 +00:00
init backout previous. 2007-03-24 00:17:34 +00:00
ldconfig Coverity CID 2766: Don't leak memory. 2006-03-26 23:06:45 +00:00
mbrlabel Grammar fix. 2006-01-12 20:37:23 +00:00
mknod fix setmode error handling. 2005-10-01 20:23:54 +00:00
modload Replace complicated test for ELFSIZE 64 with #ifdef _LP64 which is 2006-07-08 05:49:01 +00:00
modunload Move WARNS=3 to the Makefile.inc, and add a little const to the remaining 2005-06-27 01:00:04 +00:00
mount - removes unused ctype.h header 2007-03-10 00:30:36 +00:00
mount_ados - removes unused ctype.h header 2007-03-10 00:30:36 +00:00
mount_cd9660 use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_ext2fs use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_fdesc use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_ffs use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_filecore - removes unused ctype.h header 2007-03-10 00:30:36 +00:00
mount_hfs Fill in AUTHORS section. Bump date. 2007-05-19 14:21:36 +00:00
mount_kernfs use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_lfs Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting 2006-11-11 14:47:27 +00:00
mount_msdos - removes unused ctype.h header 2007-03-10 00:30:36 +00:00
mount_nfs Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
mount_ntfs - removes unused ctype.h header 2007-03-10 00:30:36 +00:00
mount_null use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_overlay use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_portal replace varstack alloc with malloc. 2006-11-09 19:41:59 +00:00
mount_procfs whooops, bump date also 2007-04-05 21:31:44 +00:00
mount_ptyfs use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_smbfs sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
mount_sysvbfs use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_tmpfs s/tons/lots/, per simonb@'s suggestion. This looks more formal. 2007-01-03 08:39:29 +00:00
mount_udf - removes unused ctype.h header 2007-03-10 00:30:36 +00:00
mount_umap use MOPT_NULL 2006-10-16 03:37:42 +00:00
mount_union use MOPT_NULL 2006-10-16 03:37:42 +00:00
newbtconf .An -nosplit 2005-09-30 20:18:12 +00:00
newfs PR/36229: Geoff Wing: uninitialized dkwedge_info structure in mount_mfs 2007-04-28 02:56:32 +00:00
newfs_lfs Remove more duplicate #includes, 2007-01-17 21:59:49 +00:00
newfs_msdos include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
newfs_sysvbfs sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
nologin Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
pdisk Move WARNS=3 to the Makefile.inc, and add a little const to the remaining 2005-06-27 01:00:04 +00:00
ping Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
ping6 Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
pppoectl Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
raidctl close fp in several error paths, closing Coverity CIDs 1690, 1692. 2006-03-19 01:57:11 +00:00
rcorder No need to cast pointers to (char *) when passing to free(3). 2007-03-03 00:09:30 +00:00
reboot Add a caveat about reboot(8) not running shutdown scripts. This addresses 2007-05-24 23:19:43 +00:00
resize_ffs Fix a typo in a comment. 2005-06-03 03:34:44 +00:00
resize_lfs Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting 2006-11-11 14:47:27 +00:00
restore Bump date because of last change. 2007-04-30 12:33:13 +00:00
rndctl Move WARNS=3 to the Makefile.inc, and add a little const to the remaining 2005-06-27 01:00:04 +00:00
route TSEL() is const char* now 2007-02-18 01:48:37 +00:00
routed Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
rtsol rtsol: factor out dump.c if -DSMALL (for boot floppy) 2004-01-03 01:40:31 +00:00
savecore from Anon Ymous: remove (void)&var; 2006-12-18 20:08:48 +00:00
scan_ffs Add -b flag into usage(). 2007-05-01 21:43:37 +00:00
scsictl Bump date for previous. 2007-01-23 20:34:17 +00:00
setkey Redo previous rework to generate yacc/lex output again and remove generated 2005-12-16 16:25:07 +00:00
shutdown Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the 2007-05-28 12:06:17 +00:00
slattach Misc fixes for sl(4) and slattach(8) man pages: 2006-07-08 17:22:14 +00:00
swapctl Sort sections. Fix typo. Start sentence with upper-case letter. 2006-09-02 23:58:41 +00:00
sysctl PR/35304: C J Coleman: Off-by-one nul byte overwrite in mode_bits routine 2006-12-21 22:25:39 +00:00
ttyflags Remove more duplicate #includes, 2007-01-17 21:59:49 +00:00
tunefs Move WARNS=3 to the Makefile.inc, and add a little const to the remaining 2005-06-27 01:00:04 +00:00
umount Izumi Tsutsui pointed out that we don't need vfslist.c (from ../mount) 2006-01-21 11:59:53 +00:00
veriexecctl Add missing #include <sys/ioctl.h> to make this build without warnings. 2007-05-15 22:01:19 +00:00
wdogctl Add -x to usage. 2006-08-13 23:24:53 +00:00
wsconsctl Mention include proper file for keyboard defines; from Zafer. 2006-10-22 19:39:32 +00:00
Makefile Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block 2007-05-01 17:18:52 +00:00
Makefile.inc WFORMAT is no more... 2006-10-08 17:52:28 +00:00