History log of /openbsd-current/usr.sbin/lpr/common_source/lp.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.21 29-Feb-2016 jca

Move ckqueue() to common_source/common.c

Patch from Chris Bennett, ok tb@


Revision tags: OPENBSD_5_9_BASE
# 1.20 12-Jan-2016 tb

Move prototypes of local functions from lp.h to the .c files and make
functions static if possible. Move delay() to lpd/printjob.c and fix
an annoying typo.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.19 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.18 10-Dec-2013 naddy

Remove the printcap fc, fs, xc, xs capabilities from lpd that were used
to configure a tty by poking magic numbers into sgtty. If needed, the
ms capability, which uses symbolic stty modes, can be used instead.
Better description of ms from FreeBSD.
ok beck@, deraadt@, jmc@ (man page)


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.17 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


# 1.16 29-Nov-2012 guenther

Change scandir()'s 'select' argument from
int (*)(struct dirent *)
to
int (*)(const struct dirent *)
to match POSIX.

ok millert@, ports check by naddy@


Revision tags: OPENBSD_5_2_BASE
# 1.15 04-Mar-2012 fgsch

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.14 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.13 13-Jun-2002 millert

Fixed some lpd bugs while on the plane from Calgary:
o mark fatal() as __dead
o add SIGINT to the signal mask when installing abort() as a handler.
We can end up in abortpr() due to several different signals and since
abortpr() kill()s itself with SIGINT we need to explicately protect
against the current process receiving SIGINT while in abortpr()
o Don't leak the lock fd to children spawned by lpd
o Close the lock file (and thus unlocke immediately in abortpr().
Otherwise, if there is an output filter the lock file only gets
closed after we finish waiting for the output filter to die.
This causes a race condition in lprm such that the per-printer
daemon does not get restarted when lprm kills the active job
(noticed during c2k2 with the mp3 printer spool ;-)
o Open the printcap file with privs raised just in case it is not
world-readable.


# 1.12 09-Jun-2002 millert

Convert remaining K&R function headers to ANSI


# 1.11 09-Jun-2002 millert

o Kill "garbage" global (unused)
o Kill "rank" global (doesn't need to be global)
o Make inform() static (local to displayq.c)
o Pass in rank to inform() based on index within sorted mtime array
o Simplify compar()


# 1.10 08-Jun-2002 millert

Remove setuid root from lp*. lpr needs to be setuid daemon so the
files it creates are not owned by the user spooling them but the
others (lpc, lpq, lprm) can get away with setgid daemon. lpd runs
as user daemon for most things, only changing its uid to 0 for
things that must be done as root.

For the time being, don't require connections to come from a reserved
port since lpq/lpr/lprm can't acquire that w/o setuid root. In the
near future we will have a mechanism for select non-root processes
to grab reserved ports.

The upshot of this is that spool directories must be writable by
group daemon and the files within the spool dirs must be owned by
daemon.


# 1.9 20-May-2002 millert

Pull in useful bits from NetBSD and make our lp* easier to diff and
do some minor cleanup of my own:

o IPv6 support
o ANSI function headers
o use getopt()
o synce usage() with man pages
o passes -Wall on both 32bit and 64bit platforms
o add an option to set the max number of children lpd will fork off
o add an lpd option to bind to specific addresses instead of INADDR_ANY.
o allow user to specify how long to wait for a connection to remote servers
o more strlcpy() and snprintf() usage
o Use FOO_FILENO constants instead of hard-coding 0-2
o Add some keeps to man the page SYNOPSIS to avoid options being split


Revision tags: OPENBSD_3_1_BASE
# 1.8 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.7 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.6 06-Dec-2001 ericj

use err/warn and friends instead of printf/exit.
also, remove fatal2() which is just errx anyway.

millert@ ok


# 1.5 23-Nov-2001 deraadt

use the same siginterrupt() trick in lpc(1) as in timedc(1). we have to hack
a global into the other programs since they share some source.


# 1.4 01-Nov-2001 mickey

displayq to honor the terminal width; millert@ ok


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.3 17-Jan-1997 millert

Add OpenBSD tags


Revision tags: OPENBSD_2_0_BASE
# 1.2 04-Jul-1996 tholo

Integrated 4.4Lite2 source
Fixed potential problem pointed out by bitblt


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision