summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/common_source/lp.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move ckqueue() to common_source/common.cjca2016-02-291-1/+2
| | | | Patch from Chris Bennett, ok tb@
* Move prototypes of local functions from lp.h to the .c files and maketb2016-01-121-20/+14
| | | | | | | functions static if possible. Move delay() to lpd/printjob.c and fix an annoying typo. ok deraadt@
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+2
| | | | | | | | | 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)
* Remove the printcap fc, fs, xc, xs capabilities from lpd that were usednaddy2013-12-101-5/+1
| | | | | | | 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)
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-2/+1
| | | | ok guenther millert kettenis
* Change scandir()'s 'select' argument fromguenther2012-11-291-2/+2
| | | | | | | | | int (*)(struct dirent *) to int (*)(const struct dirent *) to match POSIX. ok millert@, ports check by naddy@
* In preparation for getline and getdelim additions to libc, rename getline()fgsch2012-03-041-2/+2
| | | | | occurrences to get_line(). Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Fixed some lpd bugs while on the plane from Calgary:millert2002-06-131-2/+2
| | | | | | | | | | | | | | | | | 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.
* Convert remaining K&R function headers to ANSImillert2002-06-091-2/+2
|
* o Kill "garbage" global (unused)millert2002-06-091-2/+1
| | | | | | | 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()
* Remove setuid root from lp*. lpr needs to be setuid daemon so themillert2002-06-081-3/+21
| | | | | | | | | | | | | | | | 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.
* Pull in useful bits from NetBSD and make our lp* easier to diff andmillert2002-05-201-5/+10
| | | | | | | | | | | | | | | | 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
* Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)millert2002-02-171-2/+2
|
* 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.millert2002-02-161-24/+24
|
* use err/warn and friends instead of printf/exit.ericj2001-12-061-2/+1
| | | | | | also, remove fatal2() which is just errx anyway. millert@ ok
* use the same siginterrupt() trick in lpc(1) as in timedc(1). we have to hackderaadt2001-11-231-1/+4
| | | | a global into the other programs since they share some source.
* displayq to honor the terminal width; millert@ okmickey2001-11-011-2/+2
|
* Add OpenBSD tagsmillert1997-01-171-0/+2
|
* Integrated 4.4Lite2 sourcetholo1996-07-041-3/+4
| | | | Fixed potential problem pointed out by bitblt
* initial import of NetBSD treederaadt1995-10-181-0/+127