History log of /src/usr.sbin/lpr/common_source |
Revision | Date | Author | Comments |
1.12 | 20-Dec-2014 |
prlw1 | MKINET6=no build fixes
http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
|
1.11 | 03-May-2008 |
lukem | branches: 1.11.40; Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is a variable that is used by in-tree Makefiles to control behaviour. (MKsomevar variables are generally intended to be controlled by the end-user)
|
1.10 | 23-May-2004 |
tron | branches: 1.10.24; Really set "MKPRIVATELIB" and not "INTERNALLIB".
|
1.9 | 23-May-2004 |
lukem | Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and setting NOLINT, NOPIC, NOPROFILE (etc)
|
1.8 | 18-Sep-2002 |
lukem | minor makefile delint
|
1.7 | 12-Dec-2001 |
tv | MKfoo=no -> NOfoo
|
1.6 | 05-Dec-1999 |
jdolecek | put fatal() and a some of variables used independantly of other functions in common.c into separate files - this slighly cuts down size of pac(1) not that it's really significant, but every bit counts ....
|
1.5 | 13-Mar-1999 |
lukem | branches: 1.5.6; set MKLINT=no. noted by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
|
1.4 | 13-Feb-1999 |
lukem | convert from NOxxx= to MKxxx=no. include <bsd.own.mk> if testing a MKxxx variable.
|
1.3 | 11-Oct-1997 |
mycroft | GC some garbage variables.
|
1.2 | 11-Oct-1997 |
veego | Don't install this libraries, we only this during the build.
|
1.1 | 10-Oct-1997 |
lukem | only compile common_source/* once (25% faster), remove unused printcap.c
|
1.5.6.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.10.24.1 | 18-May-2008 |
yamt | sync with head.
|
1.11.40.1 | 29-Dec-2014 |
martin | Pull up following revision(s) (requested by prlw1 in ticket #358): sbin/route/route.c: revision 1.149 external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c: revision 1.7 external/bsd/ipf/dist/lib/printhost.c: revision 1.3 usr.sbin/lpr/common_source/common.c: revision 1.43 usr.sbin/lpr/common_source/Makefile: revision 1.12 external/bsd/ipf/dist/lib/printhostmask.c: revision 1.3 external/bsd/ipf/dist/lib/save_v1trap.c: revision 1.2 external/bsd/dhcpcd/dist/dhcpcd.c: revision 1.21 external/bsd/tcpdump/bin/Makefile: revision 1.12 external/bsd/ipf/dist/lib/save_v2trap.c: revision 1.2 external/bsd/ipf/dist/tools/lexer.c: revision 1.2 external/bsd/ppp/usr.sbin/pppd/sys-bsd.c: revision 1.3 external/bsd/ipf/dist/lib/printipfexpr.c: revision 1.2 MKINET6=no build fixes http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
|
1.2 | 05-Oct-1997 |
mrg | oops; did not mean to import these.
|
1.1 | 05-Oct-1997 |
mrg | branches: 1.1.1; Initial revision
|
1.1.1.1 | 05-Oct-1997 |
mrg | lite-2
|
1.2 | 05-Oct-1997 |
mrg | oops; did not mean to import these.
|
1.1 | 05-Oct-1997 |
mrg | branches: 1.1.1; Initial revision
|
1.1.1.1 | 05-Oct-1997 |
mrg | lite-2
|
1.44 | 13-May-2023 |
andvar | change a typo in sizeof(struct queueue *) to sizeof(nqueue[0]) riastradh recommends using array[0] instead of pointer.
|
1.43 | 20-Dec-2014 |
prlw1 | MKINET6=no build fixes
http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
|
1.42 | 13-Nov-2013 |
christos | branches: 1.42.4; CID 1125882: Don't use unitialized variable; move code inside conditional where it was intended.
|
1.41 | 19-Oct-2013 |
christos | use new scopeid functions
|
1.40 | 13-Jul-2009 |
roy | branches: 1.40.6; 1.40.12; Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
1.39 | 18-Jan-2009 |
lukem | fix -Wsign-compare issues
|
1.38 | 01-Dec-2007 |
mlelstv | Sort queue by time and jobid so that jobs submitted within the same second are printed in order. Fixes PR bin/37346
|
1.37 | 25-May-2006 |
christos | branches: 1.37.4; 1.37.6; 1.37.10; Add missing semicolon.
|
1.36 | 25-May-2006 |
christos | Coverity CID 3322: Fix memory leak.
|
1.35 | 21-Mar-2006 |
christos | Coverity CID 1750: Add a function to free a queue and use it.
|
1.34 | 17-Mar-2006 |
christos | free memory on allocation failure.
|
1.33 | 20-Jan-2006 |
christos | 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.
|
1.32 | 18-Jan-2006 |
garbled | change return(0) to return(rv). We went to all the trouble to calculate the return value, we might as well return it. (fixes lpq -a, and probably lpd)
|
1.31 | 17-Jan-2006 |
garbled | 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.
|
1.30 | 17-Jan-2006 |
garbled | in ckqueue() if "sd" is not an existing capability, than sd will be uninitialized, causing the free() in out: to explode. Initialize sd to NULL.
|
1.29 | 04-Jan-2006 |
garbled | Address PR bin/12112 Lpd has the ability to start on a port other than "printer" but has no way to connect to a remote lpd on that port. This change adds the ability to specify port@host in the rm element of printcap(5). Tested to work with both a standard lpd setup and one running on special ports.
|
1.28 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.27 | 16-Nov-2004 |
itojun | branches: 1.27.2; NI_WITHSCOPEID was not picked up by IETF standardization
|
1.26 | 16-Oct-2003 |
itojun | safer use of realloc
|
1.25 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.24 | 18-Sep-2002 |
mycroft | select() -> nanosleep()
|
1.23 | 14-Jul-2002 |
wiz | Unifdef __STDC__. Remove __P(). ANSIfy.
|
1.22 | 05-Apr-2001 |
wiz | Fix possible security problem (euid swapout in error handling). Based on a similar patch in OpenBSD, reported there by j@ida.interface-business.de. Fix the second occurrance of a similar problem in that file, too, though.
|
1.21 | 09-Aug-2000 |
itojun | rewrite local address detection code, to use getifaddrs(3), not gethostname(3). gethostname(3) do not necessarily represent local host addrses. pointed out by: Chuck Cranor
|
1.20 | 25-Apr-2000 |
itojun | branches: 1.20.4; allow lp=port@host again. PR9975 from Andreas Gustafsson.
|
1.19 | 24-Apr-2000 |
itojun | avoid NULL pointer access when rp=<ipv4 numberic address> (no ai_canonname). From: hiro@takechi.org
XXX checkremote() should be improved. gethostname -> getaddrinfo is not the right thing to do, we cannot assume DNS FQDNs is configured as hostname. if the goal here is to check if it is really remote or not, getifaddrs() is the way to go.
|
1.18 | 18-Feb-2000 |
itojun | do not sleep on ECONNREFUSED, rather, try the next address first. the behavior itself has a room for debate. (why we retry on ECONNREFUSED?)
From: SHIMIZU Ryo <ryo@misakimix.org>
|
1.17 | 27-Jan-2000 |
itojun | IPv6 support, using rcmd-family funciton added. NetBSD PR: 9050 From: Feico Dillema
|
1.16 | 05-Dec-1999 |
jdolecek | put fatal() and a some of variables used independantly of other functions in common.c into separate files - this slighly cuts down size of pac(1) not that it's really significant, but every bit counts ....
|
1.15 | 26-Sep-1999 |
mrg | delint and other cleanups.
|
1.14 | 09-Jul-1998 |
msaitoh | branches: 1.14.4; Declare ints, too, don't default them.
|
1.13 | 06-Jul-1998 |
mrg | - 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
|
1.12 | 18-Oct-1997 |
lukem | use memcmp/memset/memmove instead of bcmp/bzero/bcopy
|
1.11 | 05-Oct-1997 |
mrg | - 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()
|
1.10 | 05-Oct-1997 |
mrg | merge 4.4 lite2
|
1.9 | 09-Dec-1996 |
mrg | remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF.
|
1.8 | 28-Nov-1995 |
jtc | branches: 1.8.4; merge in changes from 1.1 release branch
|
1.7 | 15-Nov-1995 |
pk | Add RCSIDs.
|
1.6 | 03-Oct-1995 |
hpeyerl | -- 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>
|
1.5 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.4 | 17-May-1994 |
cgd | copyright foo
|
1.3 | 08-Dec-1993 |
jtc | Upgraded to use <dirent.h>.
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 | 05-Oct-1997 |
mrg | lite-2
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.8.4.1 | 26-Jan-1997 |
rat | Update from trunk. Fixes security bugs.
|
1.14.4.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.20.4.2 | 24-Dec-2001 |
he | Pull up revision 1.21 (requested by wiz): Use getifaddrs(3) instead of gethostname(3) for local address detection.
|
1.20.4.1 | 26-Apr-2001 |
he | Pull up revision 1.22 (requested by wiz): Fix possible security problem (euid swapout in error handling).
|
1.27.2.1 | 11-May-2008 |
jdc | Pull up revision 1.38 via patch (requested by mlelstv in ticket #1929).
Sort queue by time and jobid so that jobs submitted within the same second are printed in order.
|
1.37.10.1 | 09-Jan-2008 |
matt | sync with HEAD
|
1.37.6.1 | 03-Jun-2008 |
skrll | Sync with netbsd-4.
|
1.37.4.1 | 11-May-2008 |
jdc | Pull up revision 1.38 (requested by mlelstv in ticket #1136).
Sort queue by time and jobid so that jobs submitted within the same second are printed in order.
|
1.40.12.1 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.40.6.1 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.42.4.1 | 29-Dec-2014 |
martin | Pull up following revision(s) (requested by prlw1 in ticket #358): sbin/route/route.c: revision 1.149 external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c: revision 1.7 external/bsd/ipf/dist/lib/printhost.c: revision 1.3 usr.sbin/lpr/common_source/common.c: revision 1.43 usr.sbin/lpr/common_source/Makefile: revision 1.12 external/bsd/ipf/dist/lib/printhostmask.c: revision 1.3 external/bsd/ipf/dist/lib/save_v1trap.c: revision 1.2 external/bsd/dhcpcd/dist/dhcpcd.c: revision 1.21 external/bsd/tcpdump/bin/Makefile: revision 1.12 external/bsd/ipf/dist/lib/save_v2trap.c: revision 1.2 external/bsd/ipf/dist/tools/lexer.c: revision 1.2 external/bsd/ppp/usr.sbin/pppd/sys-bsd.c: revision 1.3 external/bsd/ipf/dist/lib/printipfexpr.c: revision 1.2 MKINET6=no build fixes http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
|
1.4 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.3 | 24-Apr-2004 |
christos | constify printcapdb
|
1.2 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.1 | 05-Dec-1999 |
jdolecek | branches: 1.1.2; put fatal() and a some of variables used independantly of other functions in common.c into separate files - this slighly cuts down size of pac(1) not that it's really significant, but every bit counts ....
|
1.1.2.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.34 | 13-Jul-2009 |
roy | Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
1.33 | 18-Jan-2009 |
lukem | fix -Wsign-compare issues
|
1.32 | 21-Mar-2006 |
christos | Coverity CID 1750: Add a function to free a queue and use it.
|
1.31 | 21-Mar-2006 |
christos | Coverity CID 1752: getq() always allocates a queue if nitems >= 0, so always free it.
|
1.30 | 20-Jan-2006 |
christos | 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.
|
1.29 | 04-Jan-2006 |
garbled | Address PR bin/12112 Lpd has the ability to start on a port other than "printer" but has no way to connect to a remote lpd on that port. This change adds the ability to specify port@host in the rm element of printcap(5). Tested to work with both a standard lpd setup and one running on special ports.
|
1.28 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.27 | 30-Oct-2004 |
dsl | Add (unsigned char) cast to ctype functions Some of this code could usefully be converted to use strtoul() and/or some small helper functions.
|
1.26 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.25 | 17-May-2003 |
itojun | use strlcpy/strlcat. [fix off-by-one in displayq.c]
|
1.24 | 14-Jul-2002 |
wiz | Unifdef __STDC__. Remove __P(). ANSIfy.
|
1.23 | 08-Jun-2002 |
itojun | avoid hardcoded octals
|
1.22 | 30-Aug-2001 |
itojun | use strlcpy. from openbsd
|
1.21 | 30-Aug-2001 |
itojun | security fix from openbsd:
Fix buffer oflow reading from queue file. While we are at it, crank the size of buffers that can hold filenames to MAXPATHLEN.
|
1.20 | 25-Jun-2001 |
mrg | use DEFLP instead of "lp".
|
1.19 | 05-Jan-2001 |
lukem | use %ll_ instead of the less standard %q_
|
1.18 | 11-Oct-2000 |
is | More format string cleanups by sommerfeld.
|
1.17 | 07-Dec-1999 |
mrg | branches: 1.17.4; - 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.
|
1.16 | 26-Sep-1999 |
mrg | delint and other cleanups.
|
1.15 | 14-Sep-1998 |
frueauf | branches: 1.15.2; 1.15.4; Fix pr 5071 better after feedback from the Originator Havard Eidnes.
|
1.14 | 14-Sep-1998 |
frueauf | Add (ugly?) code to prevent core dump as described in pr 5071 by Havard Eidnes.
XXX Maybe someone with more taste and understanding should have a look XXX at this? At least I prefer this over the solution provided in the pr.
|
1.13 | 05-Oct-1997 |
mrg | fix alpha compile warnings.
|
1.12 | 05-Oct-1997 |
mrg | - 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()
|
1.11 | 05-Oct-1997 |
mrg | merge 4.4 lite2
|
1.10 | 10-Jul-1997 |
mikel | make explicit comparisons to NULL (gcc -Wall)
|
1.9 | 19-Apr-1997 |
thorpej | getc() returns an int, not a char.
|
1.8 | 09-Dec-1996 |
mrg | remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF.
|
1.7 | 28-Nov-1995 |
jtc | branches: 1.7.4; merge in changes from 1.1 release branch
|
1.6 | 15-Nov-1995 |
pk | Fix garbled lines (from Thomas Eberhardt; PR#1756). Add RCSId.
|
1.5 | 03-Oct-1995 |
hpeyerl | branches: 1.5.2; -- 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>
|
1.4 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.3 | 27-Mar-1994 |
cgd | off_t exp.
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 | 05-Oct-1997 |
mrg | lite-2
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.5.2.1 | 19-Nov-1995 |
pk | Update from trunk: fix garbled lines.
|
1.7.4.1 | 26-Jan-1997 |
rat | Update from trunk. Fixes security bugs.
|
1.15.4.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.15.2.1 | 19-Oct-2000 |
he | Pull up revision 1.18 (requested by he): Format string cleanup.
|
1.17.4.2 | 30-Sep-2001 |
he | Pull up revision 1.21 (requested by itojun): Fix buffer overflow reading from queue file. Also increase the size of buffers for file names.
|
1.17.4.1 | 17-Oct-2000 |
tv | Pullup usr.sbin string format fixes [is]. See "cvs log" for explicit revision numbers per file, from sommerfeld.
|
1.5 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.4 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.3 | 14-Jul-2002 |
wiz | Unifdef __STDC__. Remove __P(). ANSIfy.
|
1.2 | 04-Jul-2000 |
matt | More #include <stdlib.h> string, etc. cleanup
|
1.1 | 05-Dec-1999 |
jdolecek | branches: 1.1.2; put fatal() and a some of variables used independantly of other functions in common.c into separate files - this slighly cuts down size of pac(1) not that it's really significant, but every bit counts ....
|
1.1.2.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.25 | 30-Aug-2011 |
joerg | static, __printflike, __dead
|
1.24 | 13-Jul-2009 |
roy | Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
1.23 | 18-Jan-2009 |
lukem | fix -Wsign-compare issues
|
1.22 | 21-Mar-2006 |
christos | Coverity CID 1750: Add a function to free a queue and use it.
|
1.21 | 20-Jan-2006 |
christos | 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.
|
1.20 | 17-Jan-2006 |
garbled | 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.
|
1.19 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.18 | 24-Apr-2004 |
christos | constify printcapdb
|
1.17 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.16 | 14-Jul-2002 |
wiz | Unifdef __STDC__. Remove __P(). ANSIfy.
|
1.15 | 11-Oct-2000 |
is | More format string cleanups by sommerfeld.
|
1.14 | 16-Apr-2000 |
mrg | branches: 1.14.4; 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.
|
1.13 | 07-Dec-1999 |
mrg | - 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.
|
1.12 | 07-Jul-1998 |
mrg | branches: 1.12.2; 1.12.6; oops, missed this in gethostname sweep.
|
1.11 | 05-Oct-1997 |
mrg | - 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()
|
1.10 | 05-Oct-1997 |
mrg | merge 4.4 lite2
|
1.9 | 10-Jul-1997 |
mikel | fix typos
|
1.8 | 28-Nov-1995 |
jtc | merge in changes from 1.1 release branch
|
1.7 | 15-Nov-1995 |
pk | Add RCSIDs.
|
1.6 | 03-Oct-1995 |
hpeyerl | -- 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>
|
1.5 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.4 | 18-May-1994 |
cgd | need unistd.h
|
1.3 | 08-Dec-1993 |
jtc | Upgraded to use <dirent.h>.
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 | 05-Oct-1997 |
mrg | lite-2
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.12.6.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.12.2.1 | 19-Oct-2000 |
he | Pull up revision 1.15 (requested by he): Format string cleanup.
|
1.14.4.1 | 17-Oct-2000 |
tv | Pullup usr.sbin string format fixes [is]. See "cvs log" for explicit revision numbers per file, from sommerfeld.
|
1.9 | 03-Dec-2021 |
andvar | fix various typos in comments, log messages and documentation.
|
1.8 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.7 | 28-Nov-1995 |
jtc | merge in changes from 1.1 release branch
|
1.6 | 15-Nov-1995 |
pk | Add RCSIDs.
|
1.5 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.4 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.3 | 25-May-1993 |
deraadt | make lpd know about modern ar files rather than the old ones. Like, if it's going to want to make an effort, at least do it right.
|
1.2 | 25-May-1993 |
deraadt | lpr should not access a_magic directly. That's what the N_BADMAG() macro in a.out.h is there for!
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.3 | 18-May-1994 |
mycroft | Clean up deleted files.
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.8 | 19-Oct-2003 |
lukem | #define _PATH_BIN_RCMD in common_source/pathnames.h rather than using wacky Makefile rules to compile rcmd.c
|
1.7 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.6 | 14-Mar-1997 |
mycroft | Change _PATH_MASTERLOCK to /var/run/lpd.pid.
|
1.5 | 28-Nov-1995 |
jtc | merge in changes from 1.1 release branch
|
1.4 | 15-Nov-1995 |
pk | Add RCSIDs.
|
1.3 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.11 | 10-Oct-1997 |
lukem | only compile common_source/* once (25% faster), remove unused printcap.c
|
1.10 | 05-Oct-1997 |
mrg | - 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()
|
1.9 | 05-Oct-1997 |
mrg | merge 4.4 lite2
|
1.8 | 09-Dec-1996 |
mrg | remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF.
|
1.7 | 28-Nov-1995 |
jtc | branches: 1.7.4; merge in changes from 1.1 release branch
|
1.6 | 15-Nov-1995 |
pk | Add RCSIDs.
|
1.5 | 03-Oct-1995 |
hpeyerl | -- 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>
|
1.4 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.3 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.2 | 18-Apr-1993 |
mycroft | Cleanup for GCC 2.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 | 05-Oct-1997 |
mrg | lite-2
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.7.4.1 | 26-Jan-1997 |
rat | Update from trunk. Fixes security bugs.
|
1.25 | 13-Jul-2009 |
roy | Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
1.24 | 18-Jan-2009 |
lukem | fix -Wsign-compare issues
|
1.23 | 20-Jan-2006 |
christos | 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.
|
1.22 | 04-Jan-2006 |
garbled | Address PR bin/12112 Lpd has the ability to start on a port other than "printer" but has no way to connect to a remote lpd on that port. This change adds the ability to specify port@host in the rm element of printcap(5). Tested to work with both a standard lpd setup and one running on special ports.
|
1.21 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.20 | 30-Oct-2004 |
dsl | Add (unsigned char) cast to ctype functions Some of this code could usefully be converted to use strtoul() and/or some small helper functions.
|
1.19 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.18 | 14-Jul-2002 |
wiz | Unifdef __STDC__. Remove __P(). ANSIfy.
|
1.17 | 25-Jun-2001 |
mrg | use DEFLP instead of "lp".
|
1.16 | 16-Apr-2000 |
mrg | 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.
|
1.15 | 07-Dec-1999 |
mrg | - 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.
|
1.14 | 26-Sep-1999 |
mrg | delint and other cleanups.
|
1.13 | 05-Oct-1997 |
mrg | branches: 1.13.6; - 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()
|
1.12 | 05-Oct-1997 |
mrg | merge 4.4 lite2
|
1.11 | 10-Jul-1997 |
mikel | make explicit comparisons to NULL (gcc -Wall)
|
1.10 | 10-Mar-1997 |
cgd | fix one more goofup in the buffer safety changes: snprintf() should be called with enough space for the trailing NUL, because it (unlike strn*()) always NUL-terminates.
|
1.9 | 08-Mar-1997 |
cgd | fix two bugs pointed out by Paul Sijben <Paul.Sijben@huygens.org>: (1) incorrect check on length of data being written (fix provided by Paul Sijben <Paul.Sijben@huygens.org>), and (2) inadequate buffer (too small) for data being sent to remote meant that properly-formed messages couldn't be created, so job removal didn't work properly.
|
1.8 | 09-Dec-1996 |
mrg | remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF.
|
1.7 | 28-Nov-1995 |
jtc | branches: 1.7.4; merge in changes from 1.1 release branch
|
1.6 | 15-Nov-1995 |
pk | Fix garbled lines (from Thomas Eberhardt; PR#1756). Add RCSId.
|
1.5 | 03-Oct-1995 |
hpeyerl | branches: 1.5.2; -- 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>
|
1.4 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.3 | 08-Dec-1993 |
jtc | Upgraded to use <dirent.h>.
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 | 05-Oct-1997 |
mrg | lite-2
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.5.2.1 | 19-Nov-1995 |
pk | Update from trunk: fix garbled lines.
|
1.7.4.2 | 12-Mar-1997 |
mycroft | Fix errors in previous change.
|
1.7.4.1 | 26-Jan-1997 |
rat | Update from trunk. Fixes security bugs.
|
1.13.6.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.15 | 16-May-2007 |
christos | coverity CID 1220: Don't use size_t for return of read.
|
1.14 | 28-Nov-2005 |
christos | - WARNS = 4 - factor out commonly used code. - constify - use warn/warnx instead of printf
|
1.13 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.12 | 14-Jul-2002 |
wiz | Unifdef __STDC__. Remove __P(). ANSIfy.
|
1.11 | 26-Sep-1999 |
mrg | delint and other cleanups.
|
1.10 | 18-Jul-1998 |
lukem | branches: 1.10.4; use AF_LOCAL instead of AF_UNIX
|
1.9 | 05-Oct-1997 |
mrg | - 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()
|
1.8 | 09-Dec-1996 |
mrg | remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF.
|
1.7 | 28-Nov-1995 |
jtc | branches: 1.7.4; merge in changes from 1.1 release branch
|
1.6 | 15-Nov-1995 |
pk | Add RCSIDs.
|
1.5 | 03-Oct-1995 |
hpeyerl | -- 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>
|
1.4 | 18-May-1994 |
cgd | clean up that import. no rcsids yet.
|
1.3 | 10-Nov-1993 |
cgd | bzero structs before using; fix from theo
|
1.2 | 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 | 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.2 | 18-May-1994 |
cgd | lpr from 4.4-Lite
|
1.1.1.1 | 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.7.4.1 | 26-Jan-1997 |
rat | Update from trunk. Fixes security bugs.
|
1.10.4.1 | 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|