History log of /netbsd-src/usr.sbin/lpr/common_source/lp.h (Results 1 – 25 of 25)
Revision Date Author Comments
# 257a846a 30-Aug-2011 joerg <joerg@NetBSD.org>

static, __printflike, __dead


# 7027866a 13-Jul-2009 roy <roy@NetBSD.org>

Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.


# f5a433a7 18-Jan-2009 lukem <lukem@NetBSD.org>

fix -Wsign-compare issues


# 4a6e5a62 21-Mar-2006 christos <christos@NetBSD.org>

Coverity CID 1750: Add a function to free a queue and use it.


# c6813048 20-Jan-2006 christos <christos@NetBSD.org>

Instead of dealing with port@host in many places, do it where it is needed.
It reduces code and complexity and at the same time allows as to use symbolic
ports instead of just numeric everywhere.


# fae257a0 17-Jan-2006 garbled <garbled@NetBSD.org>

Fix PR bin/14247
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 simpl

Fix PR bin/14247
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.

show more ...


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

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


# 70229c52 24-Apr-2004 christos <christos@NetBSD.org>

constify printcapdb


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


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

Unifdef __STDC__. Remove __P(). ANSIfy.


# d8302e2d 11-Oct-2000 is <is@NetBSD.org>

More format string cleanups by sommerfeld.


# dd28a6c6 16-Apr-2000 mrg <mrg@NetBSD.org>

make scandir(3)'s 3rd argument take a function that takes a *const*
struct dirent *, rather than non-const. this makes scandir(3) the
same as the scandir implementations in libiberty and glibc, and

make scandir(3)'s 3rd argument take a function that takes a *const*
struct dirent *, rather than non-const. this makes scandir(3) the
same as the scandir implementations in libiberty and glibc, and the
select function has no need to modify the dirent.

show more ...


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


# c0aa4ce5 07-Jul-1998 mrg <mrg@NetBSD.org>

oops, missed this in gethostname sweep.


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


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

merge 4.4 lite2


# 764d9a9d 10-Jul-1997 mikel <mikel@NetBSD.org>

fix typos


# 21908ddb 28-Nov-1995 jtc <jtc@NetBSD.org>

merge in changes from 1.1 release branch


# f93236c8 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>


# 2847add2 18-May-1994 cgd <cgd@NetBSD.org>

clean up that import. no rcsids yet.


# 73a5ffdf 18-May-1994 cgd <cgd@NetBSD.org>

need unistd.h


# 3ccb8240 08-Dec-1993 jtc <jtc@NetBSD.org>

Upgraded to use <dirent.h>.


# 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