Commit Graph

111 Commits

Author SHA1 Message Date
dholland b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
christos 39a3c792a3 include utmpx.h if needed 2012-11-04 22:36:58 +00:00
christos 7f5fd4a5cd PR/45842: Henning Petersen: compare fgets with NULL not 0 2012-01-16 17:38:16 +00:00
joerg bec77c5f43 Use __dead 2011-08-31 13:32:36 +00:00
lukem d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
joerg 663328acb0 Remove non-sensical .ad macro. Don't use .Xo/.Xc. 2009-04-08 13:31:38 +00:00
lukem 9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
matt de8753b3b0 cmdtab is supposed to be const. 2008-02-16 07:31:13 +00:00
matt 80d082b8df Change/fix tsptype to const char * const []; 2008-02-16 07:30:15 +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
christos b0d544666a whitespace fixes. 2007-05-17 00:36:31 +00:00
christos 7ac2181da6 Deal with delta being negative on machines which signed shifts don't shift 1's. 2007-05-17 00:36:12 +00:00
cbiere 2ed96b7598 * timed and timedc:
* Sprinkle const.
   * Use EXIT_FAILURE instead of 1.
   * Use err(), errx().
   * Use calloc() instead of malloc()+memset().
 * timedc:
   * Non-terminated hostnames or unknown tsp_type could
     cause a crash due to out-of-bounds reads in msite().
   * Check the received packet size.
   * Merged duplicated code into functions.
   * Moved variables into the relevant scopes.
   * Use connect() so that only the receiver can reply,
     send()/recv() can be used and rejected packets
     are immediately noticed by recv() instead of causing
     timeouts.
   * Updated manpage.
2007-02-04 21:17:01 +00:00
cbiere 28ea2557d4 Let timedc use the dedicated account "_timedc" for dropping privileges
instead of abusing the account "nobody".
2007-01-28 13:51:29 +00:00
cbiere 0f2ebef2a8 * timedc is no longer setuid-root and is only usable by root due to the
use of a raw socket for ICMP; thus there is also no need to differ
   between privileged and unprivileged commands.
 * Switch to user "nobody" after allocating the raw socket.
 * Close all file descriptors above 2 (just in case).
2007-01-27 17:57:45 +00:00
cbiere 0a2098a6e9 bind() in priv_resources() is now unnecessary as pointed out by christos. 2007-01-27 00:37:56 +00:00
cbiere 2ca958bb2f * Fixed a 64-bit issue in daydiff().
* Check the packet size and sender address in daydiff().
 * priv_resources(): Use bind() instead of bindresvport() because an
   reserved port is not required. This also resolves the interoperability
   issue reported in PR bin/35479.
2007-01-27 00:15:50 +00:00
christos 07807b36a7 - centralize sendto tsp
- cleanup some casts
2007-01-26 16:12:41 +00:00
christos b841c08d29 WARNS=4 2007-01-25 23:51:28 +00:00
christos 7bc0bdf604 - merge the update code in one function
- support wtmpx
- kill local decls of logwtmp; use util.h
2007-01-25 23:51:11 +00:00
christos b772b1e89b sprinkle const. 2007-01-25 23:47:13 +00:00
cbiere 07c9d403fe * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
   strlcpy() could potentially run out-of-bounds and doesn't zero out
   unused buffer space.
 * Replaced bcopy/bzero() with memcpy/memset().
 * Fixed potential alignment/aliasing issues in measure().
 * Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
 * Renamed sin to addr because sin is a reserved identifier.
 * Use bindresvport() instead of looping over bind(); rresvport() returns
   a SOCK_STREAM socket not SOCK_DGRAM.
2007-01-25 23:25:20 +00:00
christos 06fe4f2600 - use rresvport() instead of open-coding it.
- use warn/err.
2007-01-25 22:28:03 +00:00
christos 2331183c52 PR/35479: djv AT bedford DOT net: fix byte order issue and zero the sockaddr. 2007-01-25 15:29:40 +00:00
hubertf e3b9ec947a #including <syslog.h> once is enough
From Slava Semushin <slava.semushin@gmail.com> in private mail
2007-01-16 12:08:23 +00:00
christos 8852dbf5f6 This has not worked since 2003. (Hello Itojun!) 2006-06-15 19:32:55 +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 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 b971501348 make master() return void. 2005-04-19 03:40:00 +00:00
perry 9cdb3caf29 remove obsolete register declarations. 2005-02-06 04:56:27 +00:00
dsl 3cca093e74 Add (unsigned char) cast to ctype functions 2004-10-30 15:51:20 +00:00
wiz 2ea7a74e40 Improvements from Christian "naddy" Weisgerber:
sync with FreeBSD/OpenBSD
- Add a standard option list and make appropriate changes to the
  body of the description.
- Document "-G netgroup".
- Miscellaneous grammar and mdoc fixes.

Some option resorting by yours truly.
2004-09-28 16:37:08 +00:00
wiz d77d1962dd s/transmitts/transmits/
From Gavin Atkinson (FreeBSD bug 62346) via jmc@openbsd
2004-02-09 15:43:05 +00:00
itojun 912235966a makeargv overrun. from openbsd 2003-10-13 06:14:04 +00:00
itojun 757e458559 SIOCGIFCONF -> getifaddrs conversion 2003-08-18 05:39:52 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
wiz 40bce18021 Simplify macro usage. 2003-06-30 11:55:11 +00:00
itojun c428db5b2f use strlcpy 2003-05-17 20:55:44 +00:00
itojun bd26fba38c avoid possible buffer overrun 2003-05-16 18:28:18 +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
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
wiz c053751628 compatibility, not compatiblity. 2003-01-06 13:26:24 +00:00
pooka 732f4c9fa5 Add ${MACROS} to ${ROFF} usage to make output readable
from jbernard@mines.edu in misc/19685
2003-01-05 12:24:22 +00:00
mycroft 8efb63f066 select() -> poll(), nanosleep() 2002-09-19 00:01:33 +00:00
christos 3fd7285df0 Don't include utmp.h 2002-08-02 02:13:46 +00:00
wiz babf9fcdb0 Make compile with -DHAVENIS. Also make compile with WARNS=2, and
set WARNS=2 in Makefile.
2002-07-10 22:44:22 +00:00
wiz 0fb8fdab47 ANSIfy, remove __P(). 2002-07-06 22:08:30 +00:00
wiz 557fe0a8de ANSIfy and de-__P() a bit more. 2002-07-06 22:01:40 +00:00