XXX: still not 100% "safe", except that we're in a protected directory.
XXX: arguably we should keep the fds open and fdopen(3) dup()s,
XXX: but we're in a protected directory so it shouldn't matter.
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.
that, but then fill out the control file with the "df" filename. Fix by
sending the remote file with the "df" filename, as suggested by Robert
Vargason on tech-userlevel. lpd -r now works properly with an if (input
filter)
return -1. This causes filters to fail because we get a value for
child_pid we weren't expecting. Set SIGCHLD to SIG_DFL instead to clear
the reapchild setting when forking the child lpd.
This PR claims that MacOSX 10.1 cannot print postscript files to a NetBSD
lpd because the mac will tag the file with an "o" for postscript, which
we do not handle. Rather than simply mapping o -> f as was done in the
PR, or mapping o -> l as was done in FreeBSD, I have implemented full
support for the "o" option. If a postscript filter does not exist in the
printcap file however, it will default to "l" handling.
With this change, you can now specify a "pf" or postscript filter in your
printcap, and have it handle postscript files sent to it with "lpr -o".
The "o" format in lpd is specified in RFC1179 as being a valid format flag.