Age | Commit message (Collapse) | Author |
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
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.
|
|
|
|
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()
|
|
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.
|
|
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
|
|
outside the tree)
|
|
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
|
|
also, remove fatal2() which is just errx anyway.
millert@ ok
|
|
a global into the other programs since they share some source.
|
|
|
|
|
|
Fixed potential problem pointed out by bitblt
|
|
|