Commit Graph

82 Commits

Author SHA1 Message Date
wiz 2ff26b9838 Improve markup, and add sections to xrefs, as well as the obligatory
whitespace fixes.
2001-04-05 11:49:14 +00:00
simonb a378517ea4 80 column police. 2001-03-28 03:17:41 +00:00
cgd 25bdbb661e convert to use getprogname() 2001-02-19 23:22:40 +00:00
itojun bcbf09100a listen to the port number specified on argument, as advertised
in document.  part of PR 12112 from feico@pasta.cs.uit.no.
2001-02-02 14:20:33 +00:00
lukem c2aa46e7c2 use %ll_ instead of the less standard %q_ 2001-01-05 03:27:26 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
is d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
itojun 78907e0169 don't give result of function directly into syslog, use "%s". 2000-10-03 13:54:31 +00:00
scw 5c0e061414 Free the bind-address list entries, as well as the list itself. 2000-10-03 13:28:27 +00:00
scw 97a603e5b0 Add a "-b" option to specify one or more local addresses to bind
to instead of the default INADDR_ANY.
2000-10-03 11:45:30 +00:00
itojun c8b98b814c syslog() string format hole.
http://www.securityfocus.com/templates/archive.pike?start=2000-09-24&fromthread=0&mid=85023&list=1&end=2000-09-30&threads=0&
2000-09-26 17:44:38 +00:00
itohy 880baa236b Don't pass null pointer to syslog.
lpd[6813]: mail sent to user itohy about job foo.ps on printer lp ((null))
                                                                   ^^^^^^
2000-08-24 02:03:54 +00:00
mycroft 0047d53157 Get rid of the stupid hack that makes this lose when ${CC} is more than one word. 2000-06-05 17:41:19 +00:00
enami dc0efa126e Just remove the first word so that rcmd.c compiles even if the command line
contains same substrings with the name of compiler.
2000-05-31 07:34:45 +00:00
itojun ed26506c25 usr.sbin/lpr/lpd now compiles lib/libc/net/rcmd.c on its own, to avoid
use of non-exported function __ivaliduser{,_sa}().

we cannot make __ivaliduser{,_sa}() static yet, since doing that would choke
compiled lpd binaries.  we should do it on next libc major version bump.
added a memo on lib/libc/shlib_version.
2000-05-30 01:07:43 +00:00
mrg 3f207f4f5a - fix usage message to current reality.
- pull over "lpd [port]" code from freebsd's lpr code.
- use posix signal handling.
2000-04-10 08:09:33 +00:00
itojun 7b48263c7b (rcmd.c) to make Zoularis happier, pass sa_len separately from sockaddrs.
this changes function prototype for __ivalid*.
This commit breaks binary compatibility for __ivalid*.  I believe this can be
forgiven due to the following:
- this is not really exported function.  no function prototype is in headers.
  function name starts with underbars.  No third-party applications are
  expected to use it.
- the function was introduced very recently, when rcmd.c was made IPv6-ready.
- the only customer in NetBSD tree is lpd.

(lpd.c) sync with rcmd.c change.
2000-02-24 06:33:47 +00:00
itojun 33ba3a0f18 IPv6 support, using rcmd-family funciton added.
NetBSD PR: 9050
From: Feico Dillema
2000-01-27 05:39:50 +00:00
mjl 8515b446a0 Fix null terminating the wrong buffer curtesy of similar variables
mixed up. Seemed to never have any ill effect, but then...
Noted by Tetsuya Furukawa in FreeBSD PR/15604.
1999-12-23 02:10:07 +00:00
mrg 2a987cd998 - use symbolic names for mode bits
- use _exit() where we should
- fix spelling mistake
- use vasprintf() in pstatus()
all from freebsd.
1999-12-11 02:01:18 +00:00
mrg 585454b2f2 xref setsockopt (from freebsd) and hosts.equiv. 1999-12-11 01:59:43 +00:00
mrg 2e2dfe5c71 tsk. tsk. document new features i added. 1999-12-10 23:49:03 +00:00
mrg 5b6d0e7e39 - add timeouts to displayq(), rmremote(), sendfile() and response(),
and use these timeout in the lpq, lpd and lprm programs.

these stop hung remote printers that accept tcp connections but do
not process jobs from hanging the whole system and letting the sysadmin
have a clue about what is going on with this rogue printer.

- add a -r flag to lpd to allow `of' filters for remote jobs.

i know there are ways around this, but i just don't care.

- add a -f flag to lpf to add missing carriage returns.

useful when printing UNIX files to an, eg, LaserWriter that wants CR's
as well as LF's in raw text.  stair-stepped text is no fun.

- implement child process accounting: we just have a limit on the number
  of children we can have (settable by the sysadmin), and we sleep when
  this number is reached.  this can reduce malicious not-so-malicious
  attacks on the print server by a rogue remote client..

- use setproctitle() where appropriate so the sysadmin has a clue about
  what each of the lpd's here are doing.

this was useful to help diagnose a problem (that the above child process
accounting change reduces the lossages of) where a rogue client was
attempting "lpq" operations on one stuck queue in rapid succession,
causing the lpd server to be extremely slow, due to the large number
of lpd processes running.


i have been running these changes in production for about a year.
1999-12-07 14:54:44 +00:00
mrg 23b9fac082 delint and other cleanups. 1999-09-26 10:32:27 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
mycroft d77575d3c8 Clean up SYNOPSIS formatting. 1999-03-07 11:58:22 +00:00
lukem 786b86d71b use AF_LOCAL instead of AF_UNIX 1998-07-18 05:04:35 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
fair dc026e0515 Change occurrences of "UNIX" to .Ux or .At as appropriate. 1998-04-28 06:00:51 +00:00
scottr 94cf433266 Add support for DTR/CTS flow control, from Bill Studenmund. 1997-10-20 08:07:47 +00:00
mycroft e8018f6da9 Use S_IS*(), not S_IF*. 1997-10-19 19:40:21 +00:00
lukem fbafdc25f8 use memcmp/memset/memmove instead of bcmp/bzero/bcopy 1997-10-18 08:52:17 +00:00
lukem 0acf0ef008 only compile common_source/* once (25% faster), remove unused printcap.c 1997-10-10 09:26:35 +00:00
mrg 38811f7fea document -d, -s. remove bogus #port. fix getopt(). 1997-10-09 07:58:39 +00:00
mrg 1bb06f8aab fix alpha compile warnings. 1997-10-05 16:45:43 +00:00
mrg d66fe73851 in rcleanup() don't unlink() the dfname if it contains a /. noted
by matt power <mhpower@mit.edu>.
1997-10-05 15:21:46 +00:00
mrg fe7ed7ce37 - WARNS?=1
- be safe with unlinking files (from freebsd)
- remove register
- clean up $NetBSD$'s.
- use inet_ntoa() in one place (from openbsd)
- nul terminate after a bunch of strncpy()'s
- #ifdef __STDC__ rather than #if (from freebsd)
- be safe with a bunch of string operations (from freebsd)
- use warn()/err() over home grown versions (some from freebsd)
- rename warn() to nodaemon() to remove conflict with above
- check errno from failed kill(2) against ESRCH (from freebsd)
- use getopt() rather than home grown versions (from freebsd)
- clean up a bunch of man pages (some from freebsd)
- check for hostname spoof (from freebsd)
- use POSIX wait() interfaces
- use sysconf(_SC_OPEN_MAX) in preference to NOFILE (from freebsd)
- deal with fork() failure
- index/rindex -> strchr/strrchr (some from freebsd)
- add B57600 and B115200 speeds (from freebsd)
- some KNF
- be safe with files passed in over the network (some from freebsd)
- check return value of malloc(), calloc() and strdup()
1997-10-05 15:11:58 +00:00
mrg e6a91a0997 merge 4.4 lite2 1997-10-05 11:52:17 +00:00
mikel 1b1fe0b84e use <sys/cdefs.h> __COPYRIGHT and __RCSID macros
garbage-collect old set_ttyflags() and ctime() declarations
1997-07-17 05:51:18 +00:00
mikel fff865d146 use <sys/cdefs.h> __COPYRIGHT and __RCSID macros
include <arpa/inet.h> for inet_ntoa() prototype, nuke local declaration
1997-07-17 05:49:13 +00:00
mikel 95abafa1a6 use <sys/cdefs.h> __RCSID macro, add prototype for local c_key function 1997-07-17 05:46:51 +00:00
mikel c27996f625 use <sys/cdefs.h> __RCSID macro 1997-07-17 05:44:32 +00:00
mikel 48f58872a4 xref pac(8) not nonexistent pac(1), sort xrefs 1997-07-16 05:54:25 +00:00
veego ff9b739e1a Add #include <stdio.h> for struct FILE. 1997-07-10 10:44:48 +00:00
mikel 1e7f2b7da9 fix printf formats and implicit comparisons (gcc -Wall) 1997-07-10 06:28:58 +00:00
mikel 3bf6872439 index array with int, not char 1997-07-10 06:26:44 +00:00
mikel 31e6ca8cc3 add prototypes for ksearch(), msearch(), and __ivaliduser() 1997-07-10 06:24:55 +00:00
jtc afdf5dcf23 Changed /var/spool/* to /var/spool/output/*, to be consistant with reality. 1997-07-09 02:04:26 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00