summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
Commit message (Collapse)AuthorAgeFilesLines
* environmental -> environment.charnier1997-09-181-2/+2
|
* common_source: staticize private version of warn() so to not conflictjoerg1997-08-234-26/+55
| | | | | | | | | with libc's version. lpd: use getopt(3), err(3), add usage(), allow specification of a port # on the command line as the documentation suggested for more than 10 years. PR: docs/3290
* Two minor, pedantic fixes from bde for my last pedantic fixes, plusimp1997-07-2910-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the following from recent OpenBSD changes. These changes (and all I've made) should be merged back into 2.2 when they are vetted in -current. common.c: OpenBSD 1.7: mickey: #if __STDC__ --> #ifdef __STDC__ displayq.c: OpenBSD 1.8: deraadt: 1 byte oflows; millert rmjob.c: OpenBSD 1.8: deraadt: 1 byte oflows; millert cmds.c: OpenBSD 1.9: grr: restore traditional "all" keyword option - see lpc(8) [[ This makes lpc status all work again -- imp ]] printjob.c: OpenBSD 1.17: deraadt: use sendmail -t OpenBSD 1.16: mickey: #if __STDC__ --> #ifdef __STDC__ OpenBSD 1.15: deraadt: 1 byte oflow; Don.Lewis@tsc.tdk.com recvjob.c: OpenBSD 1.11: mickey: #if __STDC__ --> #ifdef __STDC__ lpr.c: OpenBSD 1.19: mickey: #if __STDC__ --> #ifdef __STDC__ Obtained from: OpenBSD
* Fix boatloads of buffer overflows from the OpenBSD tree.imp1997-07-299-100/+151
| | | | | Be pedantic about always using sizeof(blah) vs sizeof (blah) or sizeof blah. Obtained from:OpenBSD
* index -> strchr and rindex -> strrchr to reduce the number of gratuitousimp1997-07-237-19/+19
| | | | | | diffes with NetBSD/OpenBSD. These changes seem to predate the NetBSD/OpenBSD split, so it is hard to give proper credit for them. Obtained from: OpenBSD.
* Use setuid/seteuid around dangerous operations. Also a few bufferimp1997-07-2311-50/+199
| | | | | | | | | | | | overflow patches that were "near" to where these operations are taking place. The buffer overflows are from OpenBSD. The setuid/seteuid patches are from NetBSD by way of OpenBSD (they changed them a little), at least from my read of the tree. This is the first of a series of OpenBSD lpr/et al merges. It (and them) should be merged back into 2.2 and/or 2.1 (if requested) branches when they have been shaken out in -current. Obtained from: OpenBSD
* Output name of duplicate spool dir.brian1997-07-211-1/+2
| | | | Submitted by: Wayne Scott <wscott@ichips.intel.com>
* Add code to make sure that we don't overflow the buffer that we copyimp1997-07-181-1/+4
| | | | | | | | | the hostname into. In theory the bind library should do this, but in practice the limites between system defines and bind defines make an attack using this vector possible. These patches have been in use on my systems for three months now, so I am fairly confident about them. I plan on commiting this to 2.2 and 2.1 in the near future, as well as many other patches of this nature.
* Fix a problem where remote files could be removed by exploiting raceimp1997-07-181-0/+2
| | | | | conditions similar to those reported in CERT's CA-91:10a advisory. Obtained from: Hiroshi NAKANO <nakano@rins.ryukoku.ac.jp> by way of CERT.
* Increase size of tmp hostname buffer.phk1997-07-162-4/+4
| | | | | | PR: 3889 Reviewed by: phk Submitted by: Yujiro MIYATA <miyata@bioele.nuee.nagoya-u.ac.jp>
* Fixed buffer overflow.dima1997-07-081-5/+5
| | | | Reviewed by: Warner
* Imply a 10-second connection timeout when querying remote queues, tojoerg1997-06-231-0/+13
| | | | | prevent lpq from hanging indefinately (well, 10 minutes are for sure counting as `indefinately' in this case).
* Fix a typo, so the -a option will by documented in the synopsis.joerg1997-06-211-1/+1
|
* Check for duplicate spool dirs.brian1997-05-171-1/+30
| | | | Submitted by: eivind
* Don't output extraneous tabbrian1997-05-131-3/+7
| | | | Submitted by: Garance A Drosehn <gad@eclipse.its.rpi.edu>
* Don't drop into the troff args after parsing -#.brian1997-05-131-1/+2
| | | | Submitted by: Garance A Drosehn <gad@eclipse.its.rpi.edu>
* Kill a stale .pq line.joerg1997-05-081-2/+1
|
* Support input and output filters with remote printing.brian1997-04-123-33/+374
| | | | | Output filters are executed on a per-file basis as it's necessary to supply the file size to the "other side".
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-312-3/+3
| | | | posix standard on the topic.
* Fix an off by one error when determing the default job name formpp1997-02-261-4/+4
| | | | | | | | the banner page. Closes PR# 1986. Submitted by: Mark Valentine <mark@linus.demon.co.uk>
* Revert $FreeBSD$ to $Id$peter1997-02-227-7/+7
|
* Revert $FreeBSD$ back to $Id$peter1997-02-221-1/+1
|
* Buffer overflow from OpenBSD:imp1997-02-091-5/+8
| | | | | | | | | | Rev 1.4 deraadt: (partial from full commit, other files not done yet) proactive bounds checking; help from millert Rev 1.5 millert: Possible buf oflow. Plus minor style nits to keep the style police happy (I hope) Obtained from: OpenBSD
* Buffer overflow from OpenBSD:imp1997-02-091-2/+4
| | | | | | Rev 1.7 millert: possible oflow Obtained from: OpenBSD
* Sort cross references.wosch1997-01-203-6/+6
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-148-8/+8
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Sort cross references.wosch1996-12-261-5/+6
|
* doc/1987, table heading in error.phk1996-11-121-1/+1
| | | | Submitted by: Mark Valentine Mark Valentine <mark@linus.demon.co.uk>
* lpc/cmds.c:imp1996-10-2710-38/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From NetBSD via OpenBSD to fix NetBSD PR #506 More descriptive message for printer status (OpenBSD: 1.2) Various warnings cleaned up (OpenBSD: 1.4) lpc/lpc.c: Various warnings cleaned up (OpenBSD: 1.3) lpd/lpd.c: Remove trailing blank lines (OpenBSD: 1.2) Potential umask problem with creating /dev/printer (OpenBSD: 1.4 and 1.5) Ftp bounce attack (untested on FreeBSD) (OpenBSD: 1.6, 1.8, 1.9) Fencepost in strncpy (OpenBSD: 1.6) lpd/printjob.c: Fix from freebsd for waiting for an exiting filter, that appears not in the FreeBSD CVS tree. (OpenBSD: 1.6) lpd/recvjob.c: Buffer overflow protection: use strncpy rather than strcpy. (OpenBSD: 1.3) lpr/lpr.c: NetBSD change of return type for main() (OpenBSD: 1.2) Restrict time running as root (OpenBSD: 1.7) Use getcwd rather than getwd (from NetBSD) Use snprintf rather than sprintf (OpenBSD: 1.8) Minor tweak to end of loop and buffer overflow sanity. card() overflow already in FreeBSD (OpenBSD: 1.9) lptest/lptest.c: void -> int return type of main, from NetBSD via OpenBSD (OpenBSD: 1.2) pac/pac.c: void -> int return type of main, from NetBSD via OpenBSD (OpenBSD: 1.3) Obtained from: OpenBSD
* Fix transcription error I introduced in last patch. This created aimp1996-10-261-2/+2
| | | | | | fencepost error that would run one off the end of the buffer. Noticed by: Bruce Evans
* Fix a problem where the command line could be used to overflow a stackimp1996-10-251-2/+2
| | | | | | | | buffer which could be made to lead to a root shell. This patch is OpenBSD's solution to the problem, and will silently truncate the output rather than overflow the buffer. Obtained from: OpenBSD
* Close files up to getdtablesize(), instead of up to NOFILE.bde1996-09-292-10/+18
| | | | lpd was one of 3 programs in /usr/src that (mis)used NOFILE.
* "appeared in 4.2BSD.." changed to "appeared in 4.2BSD."alex1996-07-271-1/+1
|
* Correct the Unix programmer's error #1: "char c = getc();".joerg1996-07-171-2/+4
| | | | | | Closes PR # bin/1386: lpf Text Filter does not w... Submitted by: andreas@marvin.RoBIN.de
* People ask in Usenet, how to configure remoteprinting successfullywosch1996-06-012-1/+3
| | | | | | | having a hosts.lpd(5) manpage and some references to it from within lpd(8) might help here. Close PR docs/1277 Submitted by: andreas@knobel.gun.de (Andreas Klemm)
* Convert the option parser to use getopt(3). This makes it morejoerg1996-05-112-87/+89
| | | | | | | | | | | | orthogonal with the rest of the system (you can now use either -PPS or -P PS), and makes the parser more intelligible. The only drawback is that the old semantics for the -i flag in case a non-numeric argument is following are no longer fully supported (only if -i is the very last arg at all), since getopt(3) doesn't support the discticnction between numeric and non-numeric arguments. Make lpr also understand dashes as input pseudo filenames. This finally makes lp(1) fully comply with Posix.2.
* Clean out the BUGS section/comments now that our lpr has a betterjoerg1996-05-112-21/+2
| | | | option parsing.
* Cleanup.joerg1996-05-0918-1041/+20
| | | | | | | | | The removed files are no longer needed, they are actually labelled as ``Use only if you are not 4.4BSD''. (Yeah, the ol' crufty printcap.c is really gone!) Properly declare all external objects in files ending in .h, as opposed to embed them into files ending in .c.
* Pull a bunch of fixes from the 4.4BSD-Lite2 branch. It's reallyjoerg1996-05-0512-206/+421
| | | | | | | | | | | | surprising how many trivial errors there have been... :-) Some more cleanup is needed, but i'd like to separate the Lite2 changes from other work, that's why this goes into a different commit. People with serial printers should see whether i have broken the stty- style printcap options (i hope not). Inspired by: Sergey Shkonda <serg@bcs1.bcs.zaporizhzhe.ua>
* Fix my botched 4.4Lite2 import, and revert these files to their HEADjoerg1996-05-052-17/+16
| | | | versions.
* This commit was generated by cvs2svn to compensate for changes in r15637,joerg1996-05-059-46/+728
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor-branch import of the 4.4BSD-Lite2 code for lpr. There arejoerg1996-05-0516-137/+964
| | | | | | | | | | | | | | | | several bugfixes in it that are worth considering. Don't be alarmed about the import conflicts... Obtained from: 4.4BSD-Lite2
* | Correct some man page xrefs, and some other minor changes to bring somempp1996-04-083-10/+9
| | | | | | | | | | | | man pages up to mdoc guidelines and fix some minor formatting glitches. Also fixed a number of man pages to not abuse the .Xr macro to display functions and path names and a lot of other junk.
* | Correct some cross references and some path names.mpp1996-04-061-2/+2
| |
* | Makefile: Add new modes.c file to list of objects.sef1996-04-035-57/+497
| | | | | | | | | | | | | | | | | | | | printjob.c: Use termios instead of sgtty structs and ioctls; remove support for fs/fc/xs/xc capabilities, and replace them with the ms capability (stty-like words, instead of octal bit patterns). modes.c: Modified from stty's file, parses comma-seperated list of tty modes (e.g., "cs8,-paren,-opost"). Reviewed by: rgrimes, joerg
* | Remove definitions and declarations for FS, FC, XS, XC variables, andsef1996-04-032-8/+2
| | | | | | | | | | | | replace them with MS char* variable. Reviewed by: rgrimes, joerg
* | printcap.5: Remove fs,fc,xs,xc capability, and replace them with the mssef1996-04-031-5/+3
| | | | | | | | | | | | capability Reviewed by: rgrimes, joerg
* | Correct a bunch of man page cross references and generallympp1996-02-111-3/+3
| | | | | | | | | | | | try and silence "manck". ncurses, rpc, and some of the gnu stuff are still a big mess, however.
* | Mention a bug in lpd that causes a core dump if a request is made forjoerg1996-01-071-0/+10
| | | | | | | | | | | | a file format where no filter is assigned. Pointed out by: Richard_Pontefract@vos.stratus.com
* | Fix a longstanding bug in `lpr -r'. I used alloca() instead ofjkh1995-10-051-0/+1
| | | | | | | | | | malloc(), but the change is fundamentally Chris's. Submitted by: Chris Stenton <jacs@gnome.co.uk>
OpenPOWER on IntegriCloud