| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
appropriate, and using '("%lu", (unsigned long)asizeval)' when printing
something of type size_t.
MFC after: 1 week
|
|
|
|
|
|
| |
needed to ensure that the result is null-terminated when using strncpy().
MFC after: 8 days
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
use (size_t) in a few places to avoid compile-time warnings on alpha.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Submitted by: J Wunsch <j@ida.interface-business.de> in freebsd-audit
|
|
|
|
| |
PR: bin/25544
|
|
|
|
|
| |
Submitted by: "Jason" <jsmethers@pdq.net>
Reviewed by: /sbin/md5
|
|
|
|
|
| |
Reviewed by: freebsd-current (no objection)
Obtained from: KAME
|
| |
|
| |
|
|
|
|
|
|
|
| |
Turn 'struct queue { q_time, q_name }' (loosely-speaking)
into 'struct jobqueue { job_time, job_cfname }'
Reviewed by: GAWollman
|
|
|
|
|
|
|
| |
with long (>32 character) hostnames.
PR: 14978
Submitted by: Tatsuya Kudoh <cdr@cosmonet.org>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
'lprNG' (which writes control-lines in a different order than our lpr).
Reviewed by: freebsd-print@bostonradio.org
|
|
|
|
| |
PR: 21006
|
|
|
|
|
|
| |
It was not discussed and should probably not happen.
Requested by: msmith and others
|
|
|
|
|
|
|
|
| |
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
|
|
|
|
|
| |
deleted here. Diff shows there is only one change to this file, which
matches the repo histories.
|
|
|
|
|
| |
PR: 18361
Submitted by: Garance A Drosehn <gad@freefour.acs.rpi.edu>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
about it.
PR: 7886
Submitted by: Stefan Eggers <seggers@semyam.dinoco.de> (partially)
|
|
|
|
|
| |
warnings from unused static inline functions in headers if you happen
to set CFLAGS without -O.
|
|
|
|
| |
a cast in case off_t is not a long long (as on alpha).
|
|
|
|
| |
for unused static inline functions in header files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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...
|
|
|
|
|
| |
When setting an alarm that didn't trigger, i gotta clear it again
before going on. Hmpf!
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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?
|
|
|
|
|
|
|
| |
Theo de Raadt.
Likely 2.2.5R candidate.
Obtained from: OpenBSD
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Be pedantic about always using sizeof(blah) vs sizeof (blah) or sizeof blah.
Obtained from:OpenBSD
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
PR: 3889
Reviewed by: phk
Submitted by: Yujiro MIYATA <miyata@bioele.nuee.nagoya-u.ac.jp>
|
|
|
|
|
| |
prevent lpq from hanging indefinately (well, 10 minutes are for sure
counting as `indefinately' in this case).
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|