History log of /netbsd-src/usr.sbin/lpr/lprm/lprm.c (Results 1 – 20 of 20)
Revision Date Author Comments
# fbffadb9 03-Feb-2019 mrg <mrg@NetBSD.org>

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


# 9c194566 21-Jul-2008 lukem <lukem@NetBSD.org>

Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.


# 8b0f9554 15-Dec-2007 perry <perry@NetBSD.org>

convert __attribute__s to applicable cdefs.h macros


# 04723c3f 28-Nov-2005 christos <christos@NetBSD.org>

- WARNS = 4
- factor out commonly used code.
- constify
- use warn/warnx instead of printf


# 75ba9fc7 30-Oct-2004 dsl <dsl@NetBSD.org>

Add (unsigned char) cast to ctype functions
Some of this code could usefully be converted to use strtoul() and/or
some small helper functions.


# 326b2259 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.


# 85da8822 17-May-2003 itojun <itojun@NetBSD.org>

use strlcpy/strlcat.
[fix off-by-one in displayq.c]


# 895dc72a 14-Jul-2002 wiz <wiz@NetBSD.org>

Unifdef __STDC__. Remove __P(). ANSIfy.


# 41b91279 03-Jul-2002 kleink <kleink@NetBSD.org>

postive -> positive


# 53e326dd 03-Jul-2002 wiz <wiz@NetBSD.org>

Fix error output for negative argument to '-w'.
Also update usage to include -w.
Patches from Brian Ginsbach in bin/17471.


# 5b6d0e7e 07-Dec-1999 mrg <mrg@NetBSD.org>

- 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

- 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.

show more ...


# 299578eb 16-Aug-1999 simonb <simonb@NetBSD.org>

Spell "privilege" correctly (correct spelling from Jonathan Stone).


# 32f51971 06-Jul-1998 mrg <mrg@NetBSD.org>

- 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

- 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

show more ...


# fe7ed7ce 05-Oct-1997 mrg <mrg@NetBSD.org>

- 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 _

- 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()

show more ...


# 077acf50 09-Dec-1996 mrg <mrg@NetBSD.org>

remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF.


# f54b8451 15-Nov-1995 pk <pk@NetBSD.org>

Add RCSIDs


# 8e41ca80 03-Oct-1995 hpeyerl <hpeyerl@NetBSD.org>

-- convert sgtty to termios. From: Scott Bartram <scottb@iis.net>
-- Use seteuid() to only give lpr, lprm, lpq and lpc root when they
need it from matthew green <mrg@mame.mu.oz.au>


# 3e603ff3 18-May-1994 cgd <cgd@NetBSD.org>

clean up that import. no rcsids yet.


# e9d867ef 01-Aug-1993 mycroft <mycroft@NetBSD.org>

Add RCS identifiers.


# 61f28255 21-Mar-1993 cgd <cgd@NetBSD.org>

initial import of 386bsd-0.1 sources