summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
Commit message (Collapse)AuthorAgeFilesLines
* Fix buffer overflow in queue file handling.kris2001-08-301-7/+13
| | | | | Submitted by: millert@openbsd.org, gad Reported by: X-Force <xforce@iss.net>
* mdoc(7) police: protect trailing full stops of abbreviationsru2001-08-101-1/+1
| | | | with a trailing zero-width space: `e.g.\&'.
* mdoc(7) police:ru2001-08-072-5/+3
| | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
* Basically rewrite the dofork() routine, to add more error-checking andgad2001-07-231-14/+55
| | | | | | | | | correct the error-checking that was there. With the old code, an error return from getpwuid(daemon_user) could turn the lpd process into a very effective fork-bomb... Reviewed by: freebsd-audit freebsd-print (a little...) MFC after: 6 days
* Get rid of a compile-time warning by casting to (size_t).gad2001-07-231-1/+1
| | | | MFC after: 1 week
* Get rid of a compile-time warning by casting to (size_t).gad2001-07-231-1/+1
| | | | MFC after: 1 week
* Fix a few more minor compile-time warnings, mainly by using size_t wheregad2001-07-231-10/+15
| | | | | | | appropriate, and using '("%lu", (unsigned long)asizeval)' when printing something of type size_t. MFC after: 1 week
* Get rid of some compile-time warnings by defining (or casting) variablesgad2001-07-231-19/+20
| | | | | | as size_t where appropriate. MFC after: 1 week
* Fix two compile-time warnings by defining fromlen as socklen_t.gad2001-07-231-2/+2
| | | | MFC after: 1 week
* Replace calls to strncpy with calls to strlcpy, and remove the extra stepgad2001-07-223-37/+25
| | | | | | needed to ensure that the result is null-terminated when using strncpy(). MFC after: 8 days
* Rename the -w option to be -W. The recently-added -w option is differentgad2001-07-222-7/+30
| | | | | | | | than the long-standing -w option in NetBSD, so change it before anyone in FreeBSD gets used to it. For now, -w is still accepted, but prints out some warnings via syslog. MFC after: 1 week
* Change a few read & write calls to use 'STDOUT_FILENO' instead of '1'.gad2001-07-222-7/+7
| | | | | | Submitted by: David Hill <david@phobia.ms> Reviewed by: freebsd-audit (a little) MFC after: 1 week
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-2016-43/+65
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Remove GCC'isms in CFLAGS.obrien2001-07-201-1/+1
|
* Remove whitespace at EOL.dd2001-07-154-8/+8
|
* Change lpd to perform sanity and safety checks on control files as itgad2001-07-154-6/+931
| | | | | | | | | | | | receives them from other hosts. This is meant to protect from both nefarious users (which maybe broke into some remote host that we accept print jobs from), and broken implementations of lpr on other platforms. This is done by changing recvjob.c to call the new ctl_renametf() routine in the new common_source/ctlinfo.[ch] files. This will not affect jobs coming via lpr on the local machine. Reviewed by: freebsd-print@bostonradio.org & freebsd-audit MFC after: 16 days
* Replace a call to 'alloca', thus avoiding an error when compiling ongad2001-07-151-8/+14
| | | | | | | freebsd/alpha with -ansi (and on some non-fbsd platforms). This change can only affect the access checking of 'lpr -r'. MFC after: 1 week
* Get rid of one compile-time warning by changing an 'int' to a 'size_t'.gad2001-07-151-6/+10
| | | | MFC after: 1 week
* Get lpr/pac.c to compile without warnings with BDECFLAGSgad2001-07-151-15/+15
| | | | MFC after: 1 week
* Replace three subtly-wrong calls to strncpy with calls to strlcpy, andgad2001-07-152-15/+13
| | | | | | use (size_t) in a few places to avoid compile-time warnings on alpha. MFC after: 1 week
* Fix most of the warnings generated by compiling lpr with -Wnon-const-format,gad2001-07-157-21/+27
| | | | | | | | | often by just telling gcc that some internal routine is "__printflike" (work done by Kris Kennaway <kris@FreeBSD.org>). Also fix the new warnings which show up once gcc starts checking the "printf-like parameters" passed to those routines. MFC after: 1 week
* Change signal-handling to reset SIGCHLD to SIGDFLT instead of SIG_IGN.gad2001-07-142-6/+40
| | | | | | | | | | This fixes a problem with using print filters (if=, of=, etc) that showed up in -current around June 20th. That problem initially reported by Georg-W Koltermann <gwk@sgi.com>, while most of the investigation that led to this fix was done by Anton Berezin <tobez@FreeBSD.org>. Reviewed by: freebsd-print@bostonradio.org MFC after: 1 week
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-107-7/+7
|
* Fix the type of the NULL arg to execl()brian2001-07-091-3/+4
| | | | Idea from: Theo de Raadt <deraadt@openbsd.org>
* mdoc(7) police: removed hard sentence breaks, use new .Brq macro.ru2001-07-051-54/+27
|
* Make 'lpc clean' somewhat safer. Add an 'lpc tclean' command, which allowsgad2001-06-256-47/+351
| | | | | | | | | | | | | | | | | | | one to see what files would be removed *if* an 'lpc clean' is done. 'tclean' will remove no files, and is therefore not a privileged command. Also, both 'lpc clean' and 'lpc tclean' will now look for 'core' files in spool directories (but not remove them). They also print out an extra line of info when a datafile to be removed is a symlink (from 'lpr -s'), saying what file it is a symlink to. The 'lpc clean' commands also now print out a summary line saying how many queues were checked, how many files were removed (or "would be" removed, for tclean), and how much disk space is involved. For the benefit of those who have many print queues, 'lpc clean all' will only print out the names of print queues where some "interesting" files were found, instead of printing out a header-line for every queue in your printcap file. Reviewed by: freebsd-print@bostonradio.org freebsd-audit@FreeBSD.org MFC after: 2 weeks
* Add two new options for lpd: -c will log all connection-errors to syslog,gad2001-06-252-32/+168
| | | | | | | | | | | | | | | while -w allows connection from non-reserved ports. Also improves the helpfulness of various connection-error messages. The changes for IPv6 added back in the reserved-port check which was mistakenly dropped from lpd in 1997 (copying a change from openbsd). It is best to have that check in place, but the check breaks lpr's from some implementations of lpr/lpd for Windows. The -w option is for those admins who need to accept jobs from non-reserved ports, the -c option is for admins who would like a print-server machine to log all failed connection-attempts to syslog. Reviewed by: freebsd-audit@FreeBSD.org freebsd-print@bostonradio.org MFC after: 2 weeks
* Get rid of a trigraph ("??>") mistakenly put in an error message.gad2001-06-161-1/+1
| | | | | | One less warning to annoy me... MFC after: 1 week
* *** empty log message ***gad2001-06-151-19/+15
|
* Rename a few global variables which hold hostname-related values to begad2001-06-1512-69/+90
| | | | | | | | | | | | | | | more sensible/understandable. 'from'->'from_host' 'host'->'local_host' 'fromb'->'frombuf' 'fromhost'->'origin_host' and a local-variable named 'host'->'hostbuf'. This fixes some compile-time warnings about local variables shadowing global variables. Other than renaming variables, the only actual code changes are to call strlcpy() instead of strncpy() when setting those (renamed) variables, and that 'from_ip' is now a strdup()-created buffer instead of being a static buffer compiled in as 1025 bytes. Reviewed by: freebsd-print@bostonradio.org (an earlier version) MFC after: 1 week
* Rename global variable 'name' to 'progname', thus fixing a number ofgad2001-06-157-27/+30
| | | | | | | | warnings which come up for various routines that have a parameter which is also called 'name'. Reviewed by: freebsd-print@bostonradio.org MFC after: 1 week
* Fix about 90-100 warnings one gets when trying to compile lpr&friendsgad2001-06-1222-568/+405
| | | | | | | | | | | | with BDECFLAGS on, mainly by adding 'const' to parameters in a number of routine declarations. While I'm at it, ANSI-fy all of the routine declarations. The resulting object code is exactly the same after this update as before it, with the exception of one unavoidable change to lpd.o on freebsd/alpha. Also added $FreeBSD$ line to lpc/extern.h lpc/lpc.h lptest/lptest.c Reviewed by: /sbin/md5, and no feedback from freebsd-audit
* Correct cross-references:sobomax2001-06-051-1/+1
| | | | | | | | setsockopt.3 --> setsockopt.2 syslog.8 --> syslogd.8 tcpdump.8 --> tcpdump.1 MFC after: 1 week
* mdoc(7) police: properly use a -diag list in the DIAGNOSTICS section.dd2001-04-131-4/+4
| | | | Reviewed by: ru
* beforeinstall -> SCRIPTS.ru2001-04-071-4/+2
|
* Make sure the euid is restored in an obscure error situation.gad2001-04-061-3/+4
| | | | Submitted by: J Wunsch <j@ida.interface-business.de> in freebsd-audit
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-269-7/+7
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for usr.sbin/ to 8.ru2001-03-207-4/+4
|
* Fix a number of warnings that come up when compiling with BDECFLAGS.gad2001-03-161-7/+7
|
* Add a comment pointing to the freebsd-print@bostonradio.org mailing list.gad2001-03-121-0/+3
|
* Change the usage() message to include the recently-added -4 and -6 options.gad2001-03-121-7/+15
|
* Fix "lprm -" (remove all jobs) processing for remote printer queues.gad2001-03-121-10/+17
| | | | PR: bin/25544
* Improve a few error messages wrt if= filters on remote print queues.gad2001-03-121-8/+26
|
* Stop pac dereferencing a null pointer if accounting is not enabeled.dwmalone2001-02-251-1/+2
| | | | | | PR: 24798 18191 Submitted by: Nick Hilliard <nick@netability.ie> Reviewed by: gad
* mdoc(7) police: Change -filled displays (which just happenru2001-02-071-2/+2
| | | | | | to be the same as -ragged in the current implementation) to -ragged. With mdocNG, -filled displays produce the correct output, formatted and justified to both margins.
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-012-26/+57
|
* Prepare for mdoc(7)NG.ru2001-01-161-1/+2
|
* Use macro API to <sys/queue.h>phk2000-12-302-7/+7
| | | | | Submitted by: "Jason" <jsmethers@pdq.net> Reviewed by: /sbin/md5
* Prepare for mdoc(7)NG.ru2000-12-276-7/+8
|
* IPv6 support for lpr.ume2000-12-165-142/+303
| | | | | Reviewed by: freebsd-current (no objection) Obtained from: KAME
OpenPOWER on IntegriCloud