summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
Commit message (Collapse)AuthorAgeFilesLines
...
* Change some "process id" variables from 'int' to 'pid_t', renaming somegad2002-06-041-28/+31
| | | | | | | | of them to keep better track of which-is-which (multiple variables were named 'pid'). Moved a global pid-variable into the only routine that used it. Net result: fixes two compile-time warnings... MFC after: 2 weeks
* Cosmetic improvements to some of the syslog() calls in here (in some casesgad2002-06-041-35/+44
| | | | | | simply getting the indentation right when the statement wraps). MFC after: 2 weeks
* Fix all the 'return' statements in here to follow style(9).gad2002-06-041-24/+24
| | | | MFC after: 2 weeks
* Avoid checking WIFEXITED and WTERMSIG in some error situations where thegad2002-06-041-3/+6
| | | | | | value in wstatus is not related to the process that we care about. MFC after: 2 weeks
* Stop using the depreciated 'union wait' definitions, moving to a moregad2002-06-032-26/+25
| | | | | | | standard handling of wait()-related routines. Submitted by: mike MFC after: 2 weeks
* mdoc(7) police: markup nits.ru2002-05-301-7/+11
|
* Have this use 'static const char rcsid' instead of __RCSID()gad2002-05-281-3/+4
| | | | | Discussed with: bde, obrien MFC after: 10 days
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-283-44/+0
|
* Mark all internal libraries with INTERNALLIB.ru2002-05-131-5/+1
|
* Include <netinet/in.h> to squash one more compile-time warning.gad2002-04-251-0/+2
| | | | MFC after: 3 days
* When using %p to print out pointers to struct's, first cast the valuesgad2002-04-251-7/+8
| | | | | | | | to (void *) to satisfy some stricter warning-level checks in the new gcc (on sparc64). Reviewed by: obrien MFC after: 4 days
* Improve the error message the user sees if the startdaemon routine cannotgad2002-04-231-4/+6
| | | | | | | connect() to the socket for lpd. Tell them this error probably means that the master 'lpd' process is not running. MFC after: 4 days
* Implement new printcap option of "rc" aka "remote.resend_copies".gad2002-04-234-11/+70
| | | | | | | | | | | | This is a boolean option, and if it is specified in a print queue for a remote host, it causes lpd to resend the data file for each copy the user requested on 'lpr -#n'. This is useful for network printers which accept lpd-style jobs, but which ignore the control file (and thus they ignore any request for multiple copies). PR: 25635 Reviewed by: short review on freebsd-audit MFC after: 6 days
* Add 'const' to some casts to fix two warnings that are printed by thegad2002-04-222-4/+4
| | | | | | new gcc (on sparc64). MFC after: 4 days
* Add 'const' to some casts to fix two warnings that are printed by thegad2002-04-221-2/+2
| | | | | | new gcc (on sparc64). MFC after: 4 days
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-3/+3
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* Don't needlessly redefine the afterinstall target.ru2002-04-221-6/+1
|
* Underline the default value for rp=, the same way all the other string-typegad2002-04-221-1/+1
| | | | | | default values are underlined (instead of using fake double-quotes). MFC after: 4 days
* Add description of `mc' (max copies), add short-form to long-form mappinggad2002-04-223-0/+6
| | | | | | | | for `tf' (troff filter), and add a cross-reference to chkprintcap in some lpr-related man pages. Submitted by: dwmalone MFC after: 4 days
* Use `The .Nm utility'charnier2002-04-205-22/+33
|
* Change lpd to recognize the '-s' parameter as a preferred synonymgad2002-04-192-13/+26
| | | | | | | | | | for what is currently the '-p' parameter. '-s' is what NetBSD used (and they implemented it before I added -p in FreeBSD), and it also matches the '-s' option in syslogd. Someone in OpenBSD land had also talked about adding a '-s' option, but it hasn't happened yet. MFC after: 5 days
* Remove a safety-setting line which is unnecessary now that the previousgad2002-04-191-1/+0
| | | | | | line is using strlcpy instead of strncpy. MFC after: 4 days
* Fix 'deamon' -> 'daemon' in a comment.gad2002-04-191-1/+1
| | | | | Obtained from: NetBSD, OpenBSD MFC after: 4 days
* Add a little detail to the syslog-msg that comes up when lpd can notgad2002-04-191-2/+3
| | | | | | execute a given filter. MFC after: 4 days
* A variable had been unnecessarily assigned a bogus value because gcc wasgad2002-04-071-7/+6
| | | | | | | | | "confused" about it being unassigned. In fact, gcc was right. Fix the real problem by setting that variable before break-ing out of a select statement so gcc is happy, and then remove the unnecessary assignment. Reported by: a user wondering why lpd syslog-ed about "compiler confusion" MFC after: 12 days
* Rename a variable from 'user' to 'userid' to avoid some compiler warnings.gad2002-04-071-5/+5
| | | | MFC after: 12 days
* Rearrange all the error returns from sendfile() to make sure the originalgad2002-04-071-43/+51
| | | | | | | | | input file and any temporary (filter) file are closed upon return, and that is generally done at the end of the routine. This should make it easier for a later update (not yet written) to implement a "resend_copies" option. MFC after: 12 days
* Re-arrange how output filters (of=) are handled for queues going togad2002-04-071-147/+191
| | | | | | | | | | | | | remote machines. Now they really are handled *exactly* the same as input filters (if=) for remote queues, except that they are started with a different set of parameters. This should fix a few subtle bugs in output-filter processing on such queues. It is a pretty significant re-arranging of sendfile(), moving some of it to a new execfilter() routine. PR: 36552 Reviewed by: no screams from freebsd-audit MFC after: 12 days
* Add another level of checking to 'chkprintcap', which is done bygad2001-12-154-6/+352
| | | | | | | | | | | | | "skimming thru" the printcap file looking for some common mistakes that people make. These are the kinds of mistakes where the printcap file probably looks correct to human eyes, but is wrong in some subtle way which causes a problem in some queue definitions. The program treats these as "warnings" not "errors". Note that I'm flexible on the m.f.c. schedule, if people would rather this waited until after 4.5-release. Reviewed by: no screams from freebsd-audit freebsd-print@bostonradio.org MFC after: 4 days
* Move the checks for '/' a little sooner in the code which receives filesgad2001-12-051-8/+8
| | | | | | | | | | | for a remote print job. This change comes from OpenBSD (who got it from Sebastian Krahmer of SuSE). In OpenBSD this avoids a tiny theoretical security issue, but that security issue does not exist in FreeBSD's lpr due to the changes which added 'ctl_renametf()' just before 4.4-release. This change is still worth doing in our version, but it isn't fixing a security issue. MFC after: 4 days
* My recent changes to add the ctl_renametf routine assumed that print jobgad2001-11-282-21/+38
| | | | | | | | | | | control-files will always start with 'cfA*'. It turns out that some implementations of lpd (such as solaris) may send a control file which starts with 'cfB*', or really 'cf<anyLetter>*'. Although such filenames are very odd, we did used to accept them. This changes ctl_renametf to work correctly with them, and fixes up 'lpc clean' to match. PR: bin/32183 MFC after: 10 days
* Change the recently-added 'o'-processing so it maps to 'l' instead of 'f'.gad2001-11-272-10/+15
| | | | | | | | 'l' ("plain text which includes control characters") is somewhat more appropriate for 'o' ("postscript files"), and in fact some printers treat 'l' as a request to print a postscript file. MFC after: 1 week
* Fix one more compile-time warning by renaming a local variable.gad2001-10-091-3/+3
| | | | MFC after: 4 days
* Fix a compile-time warning by declaring 'len' as size_t instead of int.gad2001-10-091-1/+1
| | | | MFC after: 4 days
* Rename the local variable 'person' to 'lpr_username', to avoid compile-timegad2001-10-091-9/+9
| | | | | | warnings about conflict with a global variable used by 'lprm'. MFC after: 4 days
* Get rid of some minor compile-time errors by changing copyright/rcsidgad2001-10-091-3/+6
| | | | | | | definitions to the same format used in other lpr source files, and by adding parenthesis to the right spot in one 'if' statement. MFC after: 4 days
* Fix minor compile-time error in definition of 'copyright'.gad2001-10-091-1/+1
| | | | MFC after: 4 days
* Fix minor compile-time warning that snunk in with changes to sortq() rtn.gad2001-10-091-0/+1
| | | | MFC after: 4 days
* *** empty log message ***obrien2001-10-011-3/+4
|
* Basically rewrite the sortq() routine which is used by 'lpc clean' andgad2001-09-271-20/+126
| | | | | | | | | | 'lpc tclean'. In some obscure cases, the previous version could cause a valid user job to be removed (by 'clean'), due to invalid assumptions in the sort routine. This was a rare problem, unless ctlinfo.c is compiled with 'LEAVE_TMPCF_FILES' turned on (to check what that rtn was doing). Reviewed by: Lack of outcry on -audit and freebsd-print@bostonradio.org MFC after: 10 days
* Add minimal support for "o"-type print-file actions in lpd control files.gad2001-09-202-13/+29
| | | | | | | | | This was described in the original RFC wrt lpr, but most lpr's do not actually implement it. There is some indication that MacOS 10.1 will be using this when sending postscript files to print servers (that is what "o"-type was supposed to signify -- postscript files). MFC after: 1 week
* Fix so that lpc's interactive-mode will not be confused by EditLine processinggad2001-09-171-0/+9
| | | | | | | into thinking that there is a print-queue called 'xterm'... Reviewed by: short discussion on freebsd-stable MFC after: 1 week
* Set BINOWN=root explicitly for setuid root binaries.ru2001-09-133-0/+3
| | | | | | This is not "useless", as one may have non-default setting for BINOWN in make.conf, and we still want these to be installed setuid root in this case.
* 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
OpenPOWER on IntegriCloud