summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typos; each file has at least one s/seperat/separat/schweikh2002-08-111-1/+1
| | | | | | | | | | (I skipped those in contrib/, gnu/ and crypto/) While I was at it, fixed a lot more found by ispell that I could identify with certainty to be errors. All of these were in comments or text, not in actual code. Suggested by: bde MFC after: 3 days
* use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.ume2002-07-221-4/+2
| | | | Approved by: gad
* Changes which rewrite 'lpc topq', and which add 'lpc bottomq'. Thesegad2002-07-179-10/+1103
| | | | | | | | | | | | | reflect much valuable feedback from wollman. More details on the new 'lpc topq' are in the log message for revision 1.2 of lpc/movejobs.c. The previous implementation of 'lpc topq' is available as 'lpc xtopq', in case there are any problems noticed in the new implementation. If there are no problems with this version, a later update will remove the 'lpc xtopq' command. Reviewed by: freebsd-print@bostonradio.org MFC after: 6 days
* The .Nm utilitycharnier2002-07-144-16/+24
|
* Call routine to free everything obtained when filling in 'struct printer'.gad2002-07-121-0/+1
| | | | MFC after: 3 days
* Fix set_qstate() so it correctly checks for any error from chmod().gad2002-07-121-1/+1
| | | | | | Note that set_qstate() is only called from several 'lpc' commands. MFC after: 3 days
* Add a SQS_QCHANGED option to set_qstate(). This will soon be used by 'lpc'.gad2002-07-122-1/+11
| | | | | Reviewed by: freebsd-print@bostonradio.org MFC after: 3 days
* Add two variables to struct jobqueue, and change the way that getq()gad2002-07-122-3/+10
| | | | | | | calculates how much space to get for that struct, so it will get the right amount when new variables are added. MFC after: 3 days
* Move prototypes for ctl_readcf and ctl_freeinf from ctlinfo.c to ctlinfo.h,gad2002-07-122-2/+2
| | | | | | so the routines can be called by an upcoming change for 'lpc topq/bottomq'. MFC after: 3 days
* Remove the backup-versions ("x*") of various lpc commands that weregad2002-07-023-377/+0
| | | | | | | recently rewritten. No one in -current has reported any problems with the newer versions. MFC after: 3 weeks
* Redo the way that fatal-error messages are done in the chkhost() routine,gad2002-06-241-64/+88
| | | | | | | | mainly so the compiler can correctly do printf-style parameter checking. Some minor improvements to a few of the error messages, but the main goal here is to get rid of a few more compile-time warning messages. MFC after: 5 days
* Stop adding ${CWARNFLAGS} to CFLAGS. The standard makefile processing willgad2002-06-238-9/+7
| | | | | | add them automatically, and there is no point in adding them twice. MFC after: 5 days
* Just rename two generic-queue init routines from 'init_*' to '*_gi'gad2002-06-163-7/+7
| | | | | | ("gi" short for 'generic init'...). MFC after: 10 days
* Add a nearly complete rewrite of the lpc command 'down'. The only user-gad2002-06-164-3/+73
| | | | | | | | | | | | | | visible change should be that more than one queue can now be specified, if one uses the '-msg' parameter to separate the list of queues from the status message to set. The previous implementation of 'down' remains available as the command 'xdown', available for instant fallback if there seems to be anything wrong with the new one. If no one reports a problem after a few weeks, then a later update will remove 'xdown'. Reviewed by: freebsd-print@bostonradio.org MFC after: 10 days
* Make the description of the 'down' command a little more readable.gad2002-06-151-2/+4
| | | | MFC after: 10 days
* Reorganize the way that arguments are processed in lpc's generic-queuegad2002-06-151-20/+24
| | | | | | | commands, to make things a little cleaner (mainly for a later update). Reviewed by: freebsd-print@bostonradio.org MFC after: 10 days
* Add a new command to 'lpc' called 'setstatus', which would be used togad2002-06-156-28/+140
| | | | | | | | | change the status message of a print queue. This includes some minor changes to the upstat() routine, so that error messages are not printed while seteuid(priv-user). Reviewed by: freebsd-audit and freebsd-print@bostonradio.org MFC after: 10 days
* Bah humbug. Fix another typo on the same comment line. It also hadgad2002-06-131-1/+1
| | | | | | an option-space instead of a space... MFC after: 10 days
* Fix a typo in a comment from the previous commit. I had a bullet-charactergad2002-06-131-1/+1
| | | | | | | instead of an asterisk. Noticed by: keramida MFC after: 10 days
* Almost complete rewrite of the lpc commands 'abort', 'enable', 'disable',gad2002-06-135-14/+457
| | | | | | | | | | | | | | | | | 'restart', 'start', 'stop' and 'up'. These are commands which mainly just alter the access bits on the lock-file of a queue, and they all now use a central routine to do that. This reduces the amount of code that is run as the priv userid, and eliminates a number of cases where error messages were written while that priv uid was in effect. As far as users are concerned, there should be no noticable difference in the new versions. In case there *is*, the previous implementations are still there as 'xabort', 'xenable', etc, so they are available for instant fallback. If no one reports a problem after a few weeks, then a later update will remove those x-commands. Reviewed by: freebsd-audit and freebsd-print@bostonradio.org MFC after: 10 days
* 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
OpenPOWER on IntegriCloud