Commit Graph

39 Commits

Author SHA1 Message Date
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
lukem 6463b925a7 Build librpcsvc as a shared library, since pam_unix.so needs it. 2005-01-08 10:02:36 +00:00
sommerfeld 8f6f405641 Use <bsd.rpc.mk> 2003-01-05 19:24:06 +00:00
lukem ec5dbc56b8 Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)
2002-08-19 14:55:14 +00:00
tv 5e6444c144 Cope with RPCGEN now conta8ining multiple words. 2002-01-29 11:22:25 +00:00
tv 001067bbd1 Readability cleanups; MKfoo=no -> NOfoo. 2001-12-12 00:51:00 +00:00
tv b6499748ae Be smarter about finding rpcgen's absolute path; only do it if ${RPCGEN}
(when evaluated) does not start with a /.  Also don't go through a make(1)
recursion step; just use !=.
2001-11-01 15:03:07 +00:00
tv 89bc80292e No need to do the tricky XRPCGEN dance; simply add the rules after
.include <bsd.lib.mk>.  Defining the explicit compile rules later is fine.
2001-10-31 20:56:09 +00:00
mycroft 6da9b09f70 Use `rpcgen -C'. 2001-03-21 20:14:10 +00:00
enami 62589880a5 No need to invoke extra shell. 2001-02-16 01:05:32 +00:00
cgd c338834cd9 use expr to do subtraction. shell math isn't as portable. 2001-01-16 02:42:39 +00:00
sommerfeld a0bc06eb92 parallelize (mostly ${MAKE} print-objdir -> ${PRINTOBJDIR}) 2000-12-30 17:21:44 +00:00
matt 1ebd90e347 Add -${MAKEFLAGS} so that make options (like -m) get used for the submake 2000-11-29 09:25:22 +00:00
erh 5303e70da5 Make targets which are generated with rpcgen depend on the rpcgen binary. 2000-09-10 23:21:49 +00:00
cgd 4bf5f7086b ${RPCGEN}, not hard-coded rpcgen 2000-07-25 06:29:44 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
lukem 1f1a64af74 remove WARNS=0, because mycroft fixed rpcgen(1) to DTRT WRT outputting KNF. 1997-10-09 22:26:17 +00:00
lukem 5542a7ca43 - define WARNS?=1 in the top-level Makefile.inc, and don't define
anywhere else.
- for now, override WARNS=0 in librpcsvc and libwrap, until they're
  cleaned up
- rcsid police

lib is now clean (except for librpcsvc and libwrap) on the i386, and
this should motivate the other ports to fix any other minor problems
that their compilers pick up that the i386 version doesn't.
1997-10-09 14:36:17 +00:00
mycroft 8eab21467b Minor cleanup. 1997-05-09 14:22:41 +00:00
mycroft cc4a1553a1 Eliminate bogus redefinitions of standard targets. 1997-05-09 07:50:03 +00:00
christos 8259dd08d6 Makefile cleanups:
use INCS variable to install includes and FILES to install objects.
1997-03-24 22:11:48 +00:00
thorpej 7f9ea0f2ed Use ${INSTALL}. 1996-10-18 05:45:01 +00:00
cgd 5dd52b454d Be more verbose during 'includes' installation. Instead of showing
'install' commands only if the 'cmp' sees differences, show the
'cmp ... || install ...' commands like other Makefiles do when
installing includes.  It's comforting to see the extra output (to see
that updated files would actually be installed), and is consistent
with other makefiles.
1996-05-10 05:03:06 +00:00
pk ed403311db $Id -> $NetBSD (PR#682). 1996-05-08 19:24:04 +00:00
jtc c2ad7fffa8 Changed rules used for converting rpc source (*.x) to *.c and *.h so
that rpcgen invocation is not hidden.  There is no reason to hide it,
and it might be useful.  For example, this makes the make -n output
much more useful.
1996-04-29 21:11:24 +00:00
jtc 146f9344c8 Echo install commands, so user knows what is being installed.
Suggested by cgd.
1996-04-29 20:52:52 +00:00
jtc 5ff4c9eae2 Use 'includes' instead of 'beforeinstall' target to install headers 1996-04-25 01:22:08 +00:00
jtc 958e765ff5 Rpcgen bugs that required us to have separate src, include, and object
directories have long been fixed.  This allows us to bring the *.x
files up into the main librpcsvc directory where they belong.
1995-01-12 19:39:43 +00:00
jtc a37f3d9ae8 Use and . 1995-01-12 19:18:41 +00:00
cgd 2ddc7beddd amq.x is gone now 1994-06-14 02:45:56 +00:00
jtc 2f567fef23 Only install header files if they are different from the ones that are
allready installed.
1994-05-22 04:20:02 +00:00
jtc 9b343db615 Rpcgen fix allows us to simplify building of rpcsvc library. 1994-01-20 23:04:13 +00:00
cgd 8a4e4890b1 move include generation and rpc source files intp lib/librpcsvc 1993-10-08 05:26:25 +00:00
mycroft cda4f8f6ee Add RCS identifiers. 1993-08-01 05:37:30 +00:00
brezak 0f3c8d7472 Add more RPC definitions. 1993-06-03 19:21:08 +00:00
brezak 2102dbe62d Keep the cp'ed .x in the objdir. Be sure to clean it too. 1993-06-03 17:07:56 +00:00
brezak 4a9e8377b4 Copy the .x file to the obj directory before running rpcgen. You have
to do this because rpcgen will generate an include line with the full
path of the .x file.
1993-06-03 16:49:21 +00:00
brezak 2c766f3e20 Fix for building in obj tree. 1993-06-03 14:45:37 +00:00
brezak f5444fe852 Build librpcsvc.a 1993-06-02 19:51:29 +00:00