Commit Graph

410 Commits

Author SHA1 Message Date
Garance A Drosehn
e2e0461977 Make the description of the 'down' command a little more readable.
MFC after:	10 days
2002-06-15 23:47:40 +00:00
Garance A Drosehn
e7f478b2f6 Reorganize the way that arguments are processed in lpc's generic-queue
commands, to make things a little cleaner (mainly for a later update).

Reviewed by:	freebsd-print@bostonradio.org
MFC after:	10 days
2002-06-15 23:31:27 +00:00
Garance A Drosehn
54032d1198 Add a new command to 'lpc' called 'setstatus', which would be used to
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
2002-06-15 22:51:58 +00:00
Garance A Drosehn
5e55dc17fb Bah humbug. Fix another typo on the same comment line. It also had
an option-space instead of a space...

MFC after:	10 days
2002-06-13 02:37:50 +00:00
Garance A Drosehn
a32355e418 Fix a typo in a comment from the previous commit. I had a bullet-character
instead of an asterisk.

Noticed by:	keramida
MFC after:	10 days
2002-06-13 02:32:42 +00:00
Garance A Drosehn
e8e715fa62 Almost complete rewrite of the lpc commands 'abort', 'enable', 'disable',
'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
2002-06-13 01:55:48 +00:00
Garance A Drosehn
5e127035e4 Change some "process id" variables from 'int' to 'pid_t', renaming some
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
2002-06-04 03:40:24 +00:00
Garance A Drosehn
0dcfaee0af Cosmetic improvements to some of the syslog() calls in here (in some cases
simply getting the indentation right when the statement wraps).

MFC after:	2 weeks
2002-06-04 02:48:12 +00:00
Garance A Drosehn
609614565f Fix all the 'return' statements in here to follow style(9).
MFC after:	2 weeks
2002-06-04 01:28:15 +00:00
Garance A Drosehn
4a13c4d9ee Avoid checking WIFEXITED and WTERMSIG in some error situations where the
value in wstatus is not related to the process that we care about.

MFC after:	2 weeks
2002-06-04 01:16:13 +00:00
Garance A Drosehn
0760287064 Stop using the depreciated 'union wait' definitions, moving to a more
standard handling of wait()-related routines.

Submitted by:	mike
MFC after:	2 weeks
2002-06-03 20:47:01 +00:00
Ruslan Ermilov
7a9946fe4f mdoc(7) police: markup nits. 2002-05-30 08:10:32 +00:00
Garance A Drosehn
afad6c6529 Have this use 'static const char rcsid' instead of __RCSID()
Discussed with:	bde, obrien
MFC after:	10 days
2002-05-28 20:37:00 +00:00
Alfred Perlstein
16d8455dcc Assume __STDC__, remove non-__STDC__ code. 2002-05-28 19:23:47 +00:00
Ruslan Ermilov
423e9124d9 Mark all internal libraries with INTERNALLIB. 2002-05-13 11:24:03 +00:00
Garance A Drosehn
f16d68d06e Include <netinet/in.h> to squash one more compile-time warning.
MFC after:	3 days
2002-04-25 07:41:49 +00:00
Garance A Drosehn
32e56cd19d When using %p to print out pointers to struct's, first cast the values
to (void *) to satisfy some stricter warning-level checks in the new
gcc (on sparc64).

Reviewed by:	obrien
MFC after:	4 days
2002-04-25 05:46:44 +00:00
Garance A Drosehn
055c131503 Improve the error message the user sees if the startdaemon routine cannot
connect() to the socket for lpd.  Tell them this error probably means that
the master 'lpd' process is not running.

MFC after:	4 days
2002-04-23 02:42:04 +00:00
Garance A Drosehn
98f6cc5401 Implement new printcap option of "rc" aka "remote.resend_copies".
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
2002-04-23 00:06:10 +00:00
Garance A Drosehn
f0baf66556 Add 'const' to some casts to fix two warnings that are printed by the
new gcc (on sparc64).

MFC after:	4 days
2002-04-22 23:28:42 +00:00
Garance A Drosehn
ac7d1b151c Add 'const' to some casts to fix two warnings that are printed by the
new gcc (on sparc64).

MFC after:	4 days
2002-04-22 23:08:07 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Ruslan Ermilov
5fd42ef525 Don't needlessly redefine the afterinstall target. 2002-04-22 10:46:12 +00:00
Garance A Drosehn
475148538b Underline the default value for rp=, the same way all the other string-type
default values are underlined (instead of using fake double-quotes).

MFC after:	4 days
2002-04-22 01:09:24 +00:00
Garance A Drosehn
4d39e5f937 Add description of `mc' (max copies), add short-form to long-form mapping
for `tf' (troff filter), and add a cross-reference to chkprintcap in some
lpr-related man pages.

Submitted by:	dwmalone
MFC after:	4 days
2002-04-22 01:04:02 +00:00
Philippe Charnier
7f94b8deee Use `The .Nm utility' 2002-04-20 12:27:18 +00:00
Garance A Drosehn
c7e56d3248 Change lpd to recognize the '-s' parameter as a preferred synonym
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
2002-04-19 19:33:24 +00:00
Garance A Drosehn
fc7477304d Remove a safety-setting line which is unnecessary now that the previous
line is using strlcpy instead of strncpy.

MFC after:	4 days
2002-04-19 18:46:10 +00:00
Garance A Drosehn
f6d5668396 Fix 'deamon' -> 'daemon' in a comment.
Obtained from:	NetBSD, OpenBSD
MFC after:	4 days
2002-04-19 18:36:56 +00:00
Garance A Drosehn
150508c64d Add a little detail to the syslog-msg that comes up when lpd can not
execute a given filter.

MFC after:	4 days
2002-04-19 18:28:35 +00:00
Garance A Drosehn
50cf7393cb A variable had been unnecessarily assigned a bogus value because gcc was
"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
2002-04-07 08:12:39 +00:00
Garance A Drosehn
6710feea89 Rename a variable from 'user' to 'userid' to avoid some compiler warnings.
MFC after:	12 days
2002-04-07 08:01:42 +00:00
Garance A Drosehn
57d49eaa35 Rearrange all the error returns from sendfile() to make sure the original
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
2002-04-07 07:48:32 +00:00
Garance A Drosehn
197ccef0c9 Re-arrange how output filters (of=) are handled for queues going to
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
2002-04-07 05:37:27 +00:00
Garance A Drosehn
43323a1d21 Add another level of checking to 'chkprintcap', which is done by
"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
2001-12-15 23:35:55 +00:00
Garance A Drosehn
7cf2c478e4 Move the checks for '/' a little sooner in the code which receives files
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
2001-12-05 02:07:20 +00:00
Garance A Drosehn
1fd731fa25 My recent changes to add the ctl_renametf routine assumed that print job
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
2001-11-28 04:30:47 +00:00
Garance A Drosehn
21ecfd4a44 Change the recently-added 'o'-processing so it maps to 'l' instead of 'f'.
'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
2001-11-27 01:32:25 +00:00
Garance A Drosehn
ce0b09c3bc Fix one more compile-time warning by renaming a local variable.
MFC after:	4 days
2001-10-09 00:38:40 +00:00
Garance A Drosehn
9e75a09e74 Fix a compile-time warning by declaring 'len' as size_t instead of int.
MFC after:	4 days
2001-10-09 00:34:20 +00:00
Garance A Drosehn
ce89013afd Rename the local variable 'person' to 'lpr_username', to avoid compile-time
warnings about conflict with a global variable used by 'lprm'.

MFC after:	4 days
2001-10-09 00:27:14 +00:00
Garance A Drosehn
2fd64de22b Get rid of some minor compile-time errors by changing copyright/rcsid
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
2001-10-09 00:09:46 +00:00
Garance A Drosehn
0ca7dba57c Fix minor compile-time error in definition of 'copyright'.
MFC after:	4 days
2001-10-09 00:06:52 +00:00
Garance A Drosehn
4f7f823487 Fix minor compile-time warning that snunk in with changes to sortq() rtn.
MFC after:	4 days
2001-10-09 00:04:59 +00:00
David E. O'Brien
757eeda04b *** empty log message *** 2001-10-01 08:43:58 +00:00
Garance A Drosehn
ceeaedd3cc Basically rewrite the sortq() routine which is used by 'lpc clean' and
'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
2001-09-27 17:16:53 +00:00
Garance A Drosehn
626fb2a6fa Add minimal support for "o"-type print-file actions in lpd control files.
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
2001-09-20 01:04:50 +00:00
Garance A Drosehn
a4c7cc9f12 Fix so that lpc's interactive-mode will not be confused by EditLine processing
into thinking that there is a print-queue called 'xterm'...

Reviewed by:	short discussion on freebsd-stable
MFC after:	1 week
2001-09-17 02:35:34 +00:00
Ruslan Ermilov
cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
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.
2001-09-13 06:48:18 +00:00
Kris Kennaway
7b7fb4bb71 Fix buffer overflow in queue file handling.
Submitted by:	millert@openbsd.org, gad
Reported by:	X-Force <xforce@iss.net>
2001-08-30 09:26:54 +00:00
Ruslan Ermilov
57e4378bf6 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
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.
2001-08-07 15:48:51 +00:00
Garance A Drosehn
ad5fdfbda1 Basically rewrite the dofork() routine, to add more error-checking and
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
2001-07-23 23:13:39 +00:00
Garance A Drosehn
79c96a6ccd Get rid of a compile-time warning by casting to (size_t).
MFC after:	1 week
2001-07-23 01:19:59 +00:00
Garance A Drosehn
a33973d41a Get rid of a compile-time warning by casting to (size_t).
MFC after:	1 week
2001-07-23 01:13:20 +00:00
Garance A Drosehn
011b9c7907 Fix a few more minor compile-time warnings, mainly by using size_t where
appropriate, and using '("%lu", (unsigned long)asizeval)' when printing
something of type size_t.

MFC after:	1 week
2001-07-23 01:08:15 +00:00
Garance A Drosehn
190c0c3872 Get rid of some compile-time warnings by defining (or casting) variables
as size_t where appropriate.

MFC after:	1 week
2001-07-23 00:15:37 +00:00
Garance A Drosehn
e95b3b9b47 Fix two compile-time warnings by defining fromlen as socklen_t.
MFC after:	1 week
2001-07-23 00:13:02 +00:00
Garance A Drosehn
5d7321f61d Replace calls to strncpy with calls to strlcpy, and remove the extra step
needed to ensure that the result is null-terminated when using strncpy().

MFC after:	8 days
2001-07-22 07:25:27 +00:00
Garance A Drosehn
605d466b60 Rename the -w option to be -W. The recently-added -w option is different
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
2001-07-22 01:05:20 +00:00
Garance A Drosehn
6897f282e5 Change a few read & write calls to use 'STDOUT_FILENO' instead of '1'.
Submitted by:	David Hill <david@phobia.ms>
Reviewed by:	freebsd-audit  (a little)
MFC after:	1 week
2001-07-22 00:03:21 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
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.
2001-07-20 06:20:32 +00:00
David E. O'Brien
ac24b049cc Remove GCC'isms in CFLAGS. 2001-07-20 04:23:13 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Garance A Drosehn
442e0eaf20 Change lpd to perform sanity and safety checks on control files as it
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
2001-07-15 05:29:38 +00:00
Garance A Drosehn
fd41faa7c9 Replace a call to 'alloca', thus avoiding an error when compiling on
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
2001-07-15 04:10:32 +00:00
Garance A Drosehn
cda5daf84c Get rid of one compile-time warning by changing an 'int' to a 'size_t'.
MFC after:	1 week
2001-07-15 03:10:54 +00:00
Garance A Drosehn
961d3645cc Get lpr/pac.c to compile without warnings with BDECFLAGS
MFC after:	1 week
2001-07-15 01:28:56 +00:00
Garance A Drosehn
a4ccd1df31 Replace three subtly-wrong calls to strncpy with calls to strlcpy, and
use (size_t) in a few places to avoid compile-time warnings on alpha.

MFC after:	1 week
2001-07-15 00:57:18 +00:00
Garance A Drosehn
6d39e1b726 Fix most of the warnings generated by compiling lpr with -Wnon-const-format,
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
2001-07-15 00:09:46 +00:00
Garance A Drosehn
bfb9fa63fc Change signal-handling to reset SIGCHLD to SIGDFLT instead of SIG_IGN.
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
2001-07-14 21:49:17 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Ruslan Ermilov
11bccf341e mdoc(7) police: removed hard sentence breaks, use new .Brq macro. 2001-07-05 08:22:01 +00:00
Garance A Drosehn
004c9c5da2 Make 'lpc clean' somewhat safer. Add an 'lpc tclean' command, which allows
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
2001-06-25 02:05:03 +00:00
Garance A Drosehn
6ddb63cad6 Add two new options for lpd: -c will log all connection-errors to syslog,
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
2001-06-25 01:45:25 +00:00
Garance A Drosehn
685f7a3889 Get rid of a trigraph ("??>") mistakenly put in an error message.
One less warning to annoy me...

MFC after:	1 week
2001-06-16 00:14:02 +00:00
Garance A Drosehn
aa4ad562c0 *** empty log message *** 2001-06-15 22:30:02 +00:00
Garance A Drosehn
cc3fd56f96 Rename a few global variables which hold hostname-related values to be
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
2001-06-15 22:03:07 +00:00
Garance A Drosehn
31058a75d0 Rename global variable 'name' to 'progname', thus fixing a number of
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
2001-06-15 16:28:37 +00:00
Garance A Drosehn
ba7a1ad76a Fix about 90-100 warnings one gets when trying to compile lpr&friends
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
2001-06-12 16:38:20 +00:00
Maxim Sobolev
1cdc139280 Correct cross-references:
setsockopt.3 --> setsockopt.2
  syslog.8 --> syslogd.8
  tcpdump.8 --> tcpdump.1

MFC after:	1 week
2001-06-05 12:50:33 +00:00
Dima Dorfman
19ab52cb4e mdoc(7) police: properly use a -diag list in the DIAGNOSTICS section.
Reviewed by:	ru
2001-04-13 19:59:47 +00:00
Ruslan Ermilov
b9ad8c8635 beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
Garance A Drosehn
c83a68e029 Make sure the euid is restored in an obscure error situation.
Submitted by:	J Wunsch <j@ida.interface-business.de> in freebsd-audit
2001-04-06 02:14:39 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Garance A Drosehn
9c83e8862e Fix a number of warnings that come up when compiling with BDECFLAGS. 2001-03-16 21:54:12 +00:00
Garance A Drosehn
5ac3f0f477 Add a comment pointing to the freebsd-print@bostonradio.org mailing list. 2001-03-12 02:13:08 +00:00
Garance A Drosehn
affa003946 Change the usage() message to include the recently-added -4 and -6 options. 2001-03-12 02:03:53 +00:00
Garance A Drosehn
6a30de0e1c Fix "lprm -" (remove all jobs) processing for remote printer queues.
PR:		bin/25544
2001-03-12 01:16:09 +00:00
Garance A Drosehn
28b051021a Improve a few error messages wrt if= filters on remote print queues. 2001-03-12 00:22:03 +00:00
David Malone
67ba68254b Stop pac dereferencing a null pointer if accounting is not enabeled.
PR:		24798 18191
Submitted by:	Nick Hilliard <nick@netability.ie>
Reviewed by:	gad
2001-02-25 13:50:29 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
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.
2001-02-07 13:45:30 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov
1bfea903ed Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
Poul-Henning Kamp
2673ed4725 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 20:56:04 +00:00
Ruslan Ermilov
8b5c4af3ff Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
Hajimu UMEMOTO
08829865f6 IPv6 support for lpr.
Reviewed by:	freebsd-current (no objection)
Obtained from:	KAME
2000-12-16 18:06:09 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Garance A Drosehn
d41a93b658 Eliminate two compile-time warnings. 2000-11-15 06:17:52 +00:00
Garance A Drosehn
f6a3be3940 Fix the '-d' option (turns on socket-debugging). Improve startup msgs.
PR:		17178
Submitted by:	Richard <satherrl@dssrg.curtin.edu.au>
2000-11-15 06:00:42 +00:00
Garance A Drosehn
59a09735ef Make sure a few strings will have terminating null characters.
(most of the PR 16186 was already applied, except for these 2 lines)

PR:		16186
Submitted by:	Przemyslaw Frasunek <venglin@lubi.FreeBSD.lublin.pl>
2000-11-15 04:57:22 +00:00
Garance A Drosehn
a4f87098ce Reset the seteuid in a few obscure error situations. 2000-11-15 04:10:59 +00:00
Garance A Drosehn
b770f3547d Just some style-related improvements. 2000-11-15 03:35:09 +00:00
Garance A Drosehn
d96ca75758 Minor style improvements. 2000-11-14 22:08:52 +00:00
Garance A Drosehn
aa538512da Fix (style) some variable initializations. 2000-11-14 22:03:59 +00:00
Garance A Drosehn
a480d5f20e Change 'count' to a more descriptive 'jobcount', and fix the stupid
comments which claim this counter is counting "files", which it is not.
2000-11-14 21:44:47 +00:00
Garance A Drosehn
a4803ea103 Get rid of 'exit(-1)' calls. Exit codes are limited to 8 bits under most
Unixes, so -1 becomes 0xFF for 2's complement and 0xFE (?) for 1's
complement.

Reviewed by:	bde@FreeBSD.org
2000-11-14 21:32:52 +00:00
Garance A Drosehn
c61c5210be My previous commit removed a line it wasn't supposed to. Add it back. 2000-11-13 16:21:24 +00:00
Garance A Drosehn
ca52ea3cc8 Replace call to mktemp() with mkstemp. Also move where that call is
done, so the correct directory is being checked.  The mkstemp() call
is meant to create a temp file for stderrs when running filters.  This
update also fixes log-file processing for remote (rm=) queues which
specify an input filter (if=).  Before, filter-errs were thrown away.
Now they'll be copied to the queue's logfile (lf=).

Reviewed by:	(a little) audit@FreeBSD.ORG & freebsd-print@bostonradio.org
2000-11-13 05:44:50 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Garance A Drosehn
cdd8df463b Fix 'printit()' to ignore some lines it doesn't recognize (most likely
coming from lprNG hosts), and print a more helpful error msg for others.
2000-11-08 00:52:11 +00:00
Garance A Drosehn
30b4b758aa Cosmetic change of a structure name.
Turn    'struct queue { q_time, q_name }'           (loosely-speaking)
into    'struct jobqueue { job_time, job_cfname }'

Reviewed by:	GAWollman
2000-11-06 19:36:38 +00:00
Garance A Drosehn
34dae154d0 Get rid of a minor compile-time warning. 2000-11-06 19:19:49 +00:00
Garance A Drosehn
3aeddf3c1b Cosmetic improvements to a few recvjob-related error messages. 2000-11-06 04:37:56 +00:00
Garance A Drosehn
7c17eaa6a8 Fix a format-code, thus getting rid of a compile-time warning msg. 2000-11-06 04:11:56 +00:00
Garance A Drosehn
19d0f858b4 Fix potential problem processing jobs from hosts with >32 character hostnames.
This may fix a problem reported by Juha Ylitalo <juha.o.ylitalo@nokia.com>
2000-11-05 03:24:26 +00:00
Garance A Drosehn
b9bde6517a Fix 'lprm' processing so is more likely to work correctly when dealing
with long (>32 character) hostnames.

PR:		14978
Submitted by:	Tatsuya Kudoh <cdr@cosmonet.org>
2000-11-05 03:21:57 +00:00
Garance A Drosehn
e84ad74c75 In the error-message routine for receiving a job, move the "cleanup" to be
after the error message is printed, because the error message may refer to
variables the "cleanup" routine will zero out.

PR:		21007
2000-11-05 02:24:20 +00:00
Garance A Drosehn
4c4f66db72 This update gets it so 'lpr -r' ("remove the file after printing") will
try to move the file from the source to the destination (spool) directory.
If that succeeds, much time and disk-space will be saved by doing that
instead of copying the entire file only to remove the original.  This
could be a big win on machines doing samba-service or CAP-based printing.

Note that this is about the fourth or fifth iteration of the patch, after
trying to address all possible security implications of the change.

PR:		16124
Reviewed by:	freebsd-current or freebsd-hackers (some time ago)
2000-11-03 03:29:01 +00:00
Garance A Drosehn
6522ebec87 Implement new printcap options of sr= (aka stat.recv) and sr= (aka stat.send)
in lpd.  Stat.recv is useful on a printserver, as something of a network
performance-monitoring tool.  Stat.send is a minimal accounting record of
sorts for jobs going to tcp/ip based printers.

Reviewed by:	freebsd-print@bostonradio.org
2000-11-02 19:22:06 +00:00
Garance A Drosehn
160325d6e6 Change 'lpr' so -C (class) information is included in the control file
even for jobs or queues which will not print header (separator) pages.

Submitted by:	"Steve O'Hara-Smith" <steveo@eircom.net>
2000-11-01 01:48:06 +00:00
Garance A Drosehn
be794da76a Make the standard 'lpq' output a little more informative when listing jobs
which have long names.  Instead of just listing '...', try to list some
reasonable subset of the name (with a "..." to indicate something missing).

Reviewed by:	freebsd-print@bostonradio.org (only a little review)
2000-10-31 20:11:30 +00:00
Garance A Drosehn
ec6b8da5b0 Fix 'lpq' so it can correctly display jobs which come from hosts using
'lprNG' (which writes control-lines in a different order than our lpr).

Reviewed by:	freebsd-print@bostonradio.org
2000-10-31 19:57:07 +00:00
Garance A Drosehn
18b85defa1 Change my email on MAINTAINER from an RPI address to my FreeBSD address. 2000-10-30 01:09:32 +00:00
Garrett Wollman
47b15ad38f Fix cosmetic error in rmjob message.
PR:		21006
2000-09-27 19:23:15 +00:00
Garrett Wollman
545ed065d2 Set SO_REUSEADDR so that lpd can start while old lpd connections are still
winding down (or timing out).  Also, be slightly more informative in
mcleanup() about why lpd is exiting.

PR:		21595
2000-09-27 19:03:05 +00:00
Alfred Perlstein
00e64813a2 the code assumes that getgroups() always returns NGROUPS groups, however
that is not true.  Instead of looping NGROUPS times, get the return value
from getgroups() and loop over the return that many times.

Noticed by: David A. Holland <dholland@eecs.harvard.edu>
2000-08-23 23:36:32 +00:00
Garrett Wollman
a34128a818 Admin some amount of responsibility for the current state of lpr/lpd.
Also add Garance Drosihn who has been doing a great deal of work on
print systems.
2000-07-15 02:43:02 +00:00
Matthew Hunt
e97781bf25 Quit on EOF from terminal instead of redisplaying the prompt. 2000-06-30 20:05:21 +00:00
Garrett Wollman
c9d86906d6 Fix description of -i' and -w' options.
Fix spelling of `TeX'.
Move historical formats into a separate list, to make thier cruftiness
clear.
2000-06-27 20:21:56 +00:00
Sheldon Hearn
077833ef99 Allow Nm to expand gracefully instead of hard-coding an argument. 2000-06-22 10:00:19 +00:00
Garrett Wollman
10915f6e07 Allow those of us who have to print through LPRng spoolers to send
spooler options using `Z' control-file lines and the `-Z' flag.
2000-06-21 20:20:26 +00:00
Jake Burkholder
e39756439c Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
Mike Pritchard
fe6c63c617 Remove the lpr/runqueue directory and associated files.
These are not used anymore and are outdated and only cause
confusion (I just committed a fix to one of these files within
the last hour, thinking it was still valid).
2000-05-24 13:05:50 +00:00
Mike Pritchard
50545e9e59 Re-implement my fix from rev 1.6 (same rev for both files being committed)
that was lost during the lite-2 merge.  From the original commit message:

Initialize the group list so that any filter programs that are
run by lpd are not run with root's groups.
2000-05-24 11:38:50 +00:00
Jake Burkholder
740a1973a6 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
Warner Losh
3ddaf7e529 This appears to have been repo-copied to lpd a while ago and never
deleted here.  Diff shows there is only one change to this file, which
matches the repo histories.
2000-05-09 19:41:18 +00:00
Garrett Wollman
2b578691e7 Print files submitted at the same instant in deterministic order.
PR:		18361
Submitted by:	Garance A Drosehn <gad@freefour.acs.rpi.edu>
2000-05-03 14:56:20 +00:00
Sheldon Hearn
ba901a111b Add -p option to prevent lpd(8) from opening a listening socket.
PR:		17384
Submitted by:	Niels Endres <niels@b5.nu>
2000-03-29 11:15:54 +00:00
Sheldon Hearn
a3e71776a6 Remove blanks lines, replacing them with Pp macros where appropriate. 2000-03-08 10:13:50 +00:00
Sheldon Hearn
422127521a Add missing description for the dummy -o option. 2000-03-08 10:06:27 +00:00
Sheldon Hearn
843422401a Add a dummy -s option for SUSv2 compatibility.
PR:		17256
Reported by:	Brooks Davis <brooks@one-eyed-alien.net>
Approved by:	jkh (release engineer)
2000-03-08 10:02:11 +00:00
Sheldon Hearn
f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Matthew Dillon
b2dc65a8d3 Type-o, change from[...] = 0 to fromb[...] = 0. The incorrect buffer
was having its last element zero'd.  It turns out not to be a security
    hole or to have any real effect on the code because 'from' was previously
    pointing to a buffer of the same size as 'fromb', and the last
    element in fromb is already 0 anyway due to the use of sizeof(fromb)-1
    in the strncpy() call.  But I'm not pressing my luck so only the type-o
    is being fixed.
2000-01-25 01:51:21 +00:00
Matthew Dillon
1bd87e1b32 'start' command was not reenabling printing.
PR: bin/15728
2000-01-24 23:30:38 +00:00
Josef Karthauser
7fcba9044d It's not been possible to configure a print server running lpd,
with remote hosts feeding it, so that some hosts have their header
pages supressed and some don't.  This is because lpd doesn't know
how to rewrite a print job before forwarding it to a remote lpd.
In particular this causes problems with p rinters that contain
their own lpd, eg. HP jet direct cards, because they can't suppress
headers.  It's not possible to have headers supressed by putting
'sh' in any printcap in the lpd chain, it is up to the originating
lpr to have a '-h' option specified at run time.

Lpr has been modified to allow _it_ to honour the 'sh' flag in the
local print cap.  This allows the administrator to switch off
headers for a particular printer (on a particular host) irrespective
of whether that printer is local to the machine or remote.

This doesn't break anything, because in the case of a remote printer
the 'sh' flag would have had no meaning, in the case of the local
printer it would have been on anyway.

Submitted by:	Scott James Remnant <scott@pavilion.net>
2000-01-19 14:25:08 +00:00
Andrey A. Chernov
d3d56c3d4c Add support for pr's locale 1999-11-30 16:15:22 +00:00
Andrey A. Chernov
13c7185319 moved to koi2alt 1999-09-23 02:54:44 +00:00
Andrey A. Chernov
168a34b780 Add koi2855 filter
Repository move koi2alt.c -> koi2alt/koi2alt.c required
1999-09-21 20:42:10 +00:00
Alexey Zelkin
c6d6e7726f Correct spelling : ascii -> ASCII
PR:		docs/13702
Submitted by:	Stephen J. Roznowski <sjr@home.com>
Reviewed by:	mpp
1999-09-20 09:15:23 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Matthew N. Dodd
061bab1a78 Fix some cut and paste damage.
Noticed by: Norman C. Rice <nrice@emu.sourcee.com>
1999-08-20 07:14:46 +00:00
Matthew N. Dodd
0b2d7c2ffc What the heck was I thinking? Nobody else saw this? Sheesh.
(num > MAX) ? MAX : num

rather than

(MAX > num) ? MAX : num

Also, make things a little easier to read while I'm here.
1999-08-20 01:24:35 +00:00
Matthew N. Dodd
43d79ae9ef Use el_source() so we pick up .editrc 1999-08-19 04:10:33 +00:00
Matthew N. Dodd
1950bb45f3 Add support for command line editing and history.
Remove src/contrib/bind/bin/nslookup/commands.c as it is generated by lex
from commands.l.

Submitted by: lpc/cdcontrol patches originally by msmith.
Reviewed by: msmith (in theory)
1999-08-19 03:29:15 +00:00
Nik Clayton
414a35e60a Add $Id$, to make it simpler for members of the translation teams to
track.

The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:12:29 +00:00
Jordan K. Hubbard
d5483ddfba lpd tries to be clever and checks if RM == my_hostname.
However, it doesn't check if the remote printer name it
is sending it to is the same as the local printer name,
and so chokes 'cos "laser" is not a real printer.

PR:		7081
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
1999-04-27 07:09:18 +00:00
Garrett Wollman
9112ae0f0e Sigh. Fix capitalization bogon. Who had the pointy hat? 1999-02-02 01:04:51 +00:00
Garrett Wollman
4f92720c08 Observe -U flag again, and use it in preference to getlogin(), if
the user is privileged.

I believe this should address both concerns in PR 9729, and may also
provide the desired behavior from PR 9485.
1999-02-01 19:53:08 +00:00
Warner Losh
66d959c376 Change my mind on using base '0' for strtol for -i and -# operations
as this would change the meaning of -#050 in preexisting scripts.
1999-01-06 08:33:38 +00:00
Warner Losh
65073469e3 Add sanity checking to argument for -# and -i. Require these
arguments to be numbers.  Also use '0' base to allow hex, octal or
decimal numbers.

This was done by me based on ideas in pr 3556, submitted by Uwe
Laubenstein and commented upon by j@uriah.heep.sax.de (J Wunsch).

PR: 3556
1999-01-06 08:25:56 +00:00
David E. O'Brien
2887f586f0 Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:14 +00:00
Garrett Wollman
90cf373d9b Fix additional warnings. Remove -Werror, since some people have complained
about it.

PR:		7886
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de> (partially)
1998-09-11 18:49:33 +00:00
Brian Somers
b538df1666 Fix ``lp=port@machine'' syntax and mention it in printcap(5). 1998-08-21 18:08:46 +00:00
John Birrell
0793ce314a Remove -Werror from CFLAGS on i386 because with -nostdinc gcc spits
warnings from unused static inline functions in headers if you happen
to set CFLAGS without -O.
1998-06-11 03:53:23 +00:00
Poul-Henning Kamp
1499abeef4 Spelling fixes.
PR:		6903
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
John Birrell
ef1c4c53f4 The printf type checking in gcc wants %qd to be a long long, so add
a cast in case off_t is not a long long (as on alpha).
1998-05-13 06:52:08 +00:00
John Birrell
84cc0c31af Make -Werror i386 specific because -nostinc on alpha spits warnings
for unused static inline functions in header files.
1998-05-13 06:50:09 +00:00
David E. O'Brien
69d23ff062 Make ``-h'' follow the manpage, and suppress the burst page reguardless of
the number of ``-h'' given.
1998-04-17 17:25:49 +00:00
Philippe Charnier
f12a14713b .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 08:31:20 +00:00
John Birrell
d1ecde2bbb Cast an argument to int for a printf field width the way that gcc
prefers it. This source is compiled with -Werror so the slightest
warning is enough to ruin my day.
1998-03-22 20:19:27 +00:00
Bruce Evans
06c779979a Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Get the default BINDIR correctly (by including ../Makefile.inc recursively.
Override the default it it is wrong.

Don't override defaults when the defaults are correct.
1998-03-07 09:48:14 +00:00
Andrey A. Chernov
28c576007e Add DESTDIR to afterinstall
Submitted by: jhay
1998-02-24 10:24:22 +00:00
Andrey A. Chernov
d1877a4c4e Oops, back out DESTDIR addition, handled automatically by bsd.prog.mk 1998-02-24 10:15:33 +00:00
Andrey A. Chernov
c4040ee87d Add missing DESTDIR 1998-02-23 09:15:01 +00:00
Garrett Wollman
19dd7f4d5a Install printcap.5 from here. 1998-02-04 15:59:10 +00:00
Andrey A. Chernov
381ee3485b Add comment describing settings
Use 66 lines on the page
1998-02-04 13:03:57 +00:00
Andrey A. Chernov
6094ceca72 Add Russian printer filters, mandatory because hardware code page 866
is different with KOI8-R
1998-02-04 12:00:46 +00:00
Garrett Wollman
8830deae19 Properly initialize the printer struct.
PR: bin/5519
1998-01-20 14:43:05 +00:00
Garrett Wollman
8ff467c6b7 Fix top-of-form bogon. 1997-12-27 20:49:39 +00:00
Garrett Wollman
3a0a936baa Add -Wno-unused so that ``make world'' can complete successfully.
GCC suppresses the warning for ``standard'' header files, but since the
headers do not come from the ``standard'' place in a ``make world'', GCC
doesn't get it.
1997-12-17 19:38:33 +00:00
Bruce Evans
b732d6bad5 Fixed DPADD. 1997-12-16 17:53:39 +00:00
John Polstra
79031fd714 Fix incorrect format string in call to errx(). 1997-12-06 17:55:07 +00:00
John Polstra
9aa446f543 Add missing argument to warn() call. 1997-12-06 05:37:18 +00:00
Garrett Wollman
b7f84b25e9 Document the new long names for printcap capabilities. 1997-12-02 21:41:40 +00:00
Garrett Wollman
4a1a0dbedb Mega lpd/lpd upgrade, part I:
- Get rid of a lot of the static variables which were shared by
  many routines and programs in the suite.
- Create an abstract interface to the printcap database, so that
  other retrieval and iteration mechanisms could be developed
  (e.g., YP, Hesiod, or automatic retrieval from a trusted server).
- Give each capability a human-readable name in addition to the historic
  two-character one.
- Otherwise generally clean up a lot of dark corners.  Many still remain.
- When submitting jobs, use the official login name record (from getlogin())
  if there is one, rather than reverse-mapping the uid.

More to come...
1997-12-02 20:46:22 +00:00
Joerg Wunsch
6d0727f460 Argl! Who's got the pointy hat these days? Hand it over to me, ASAP!
When setting an alarm that didn't trigger, i gotta clear it again
before going on.  Hmpf!
1997-11-07 13:18:50 +00:00
Joerg Wunsch
28185a1971 One could be surprised how much bugs can still be found here...
Properlay clean the global RM variable if cgetstr() failed for it.
Otherwise, a connection attempt to a remote machine was made (and a
bogus result code printed) if a local printer followed a remote one in
printcap, and you did a `lpq -a', since checkremote() falsely assumed
the printer to be a remote one.

While i was at it, removed a gratuituous newline printed in front of
the remote machine's name, thus making the output more consistent (and
better machine-parseable) now.
1997-10-15 12:16:37 +00:00
Joerg Wunsch
83f31ab169 Improve my hack from rev 1.6 of displayq.c, and make the TCP
connection timeout controllable by a new printcap(5) capability named
`ct' (connectiom timeout), defaulting to 120 seconds (which is the
default TCP connection timeout).

Would anybody see a problem with merging all this into RELENG_2_2?
1997-10-14 16:01:02 +00:00
Warner Losh
ed4d1cf9cc Be more paranoid about unlinking files. From mhpower@MIT.EDU by way of
Theo de Raadt.

Likely 2.2.5R candidate.
Obtained from: OpenBSD
1997-10-06 03:58:48 +00:00
Philippe Charnier
9b3fe531b5 Use err(3). Add usage(). Various fixes in man pages. 1997-09-24 06:48:24 +00:00
Philippe Charnier
34384756cd environmental -> environment. 1997-09-18 06:55:21 +00:00
Joerg Wunsch
36d0e2a3e2 common_source: staticize private version of warn() so to not conflict
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
1997-08-23 15:53:00 +00:00
Warner Losh
6ee8b26997 Two minor, pedantic fixes from bde for my last pedantic fixes, plus
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
1997-07-29 13:24:01 +00:00
Warner Losh
5f87a7b6b1 Fix boatloads of buffer overflows from the OpenBSD tree.
Be pedantic about always using sizeof(blah) vs sizeof (blah) or sizeof blah.
Obtained from:OpenBSD
1997-07-29 04:17:19 +00:00
Warner Losh
f8eb25da54 index -> strchr and rindex -> strrchr to reduce the number of gratuitous
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.
1997-07-23 20:53:41 +00:00
Warner Losh
360d4ad5ab Use setuid/seteuid around dangerous operations. Also a few buffer
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
1997-07-23 00:49:46 +00:00
Brian Somers
afd70290e7 Output name of duplicate spool dir.
Submitted by:	Wayne Scott <wscott@ichips.intel.com>
1997-07-21 22:40:04 +00:00