summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/lprm
AgeCommit message (Collapse)Author
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-03-25Fix last commit; to emulate setuid daemon + PRIV_END we need toTodd C. Miller
set the real & effective uids to the calling user and the saved uid to daemon. Fixes a problem where lpr could not print files that were not world-readable.
2003-03-11Make lpr and lprm setuid root but drop to daemon very early.Todd C. Miller
Functionally this is the same as when lpr and lprm were setuid daemon but the executable are now owned by root which is safer. deraadt@ OK
2002-12-08GNU semantics say that if optstring begins with '-' thenTodd C. Miller
each non-option shall be treated as arguments to option '\1'. BSD getopt match '-' in optstring with a '-' on the command line. This is used to support deprecated options like "su -" that would otherwise prevent the use of getopt(). Resolving this simply requires that the leading '-' be moved somewhere else (I moved it to the end of optstring) since position within optstring is not meaningful.
2002-06-11lprm needs to be setuid daemon after allTodd C. Miller
2002-06-08Remove setuid root from lp*. lpr needs to be setuid daemon so theTodd C. Miller
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.
2002-05-20Pull in useful bits from NetBSD and make our lp* easier to diff andTodd C. Miller
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
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-12-06use err/warn and friends instead of printf/exit.Eric Jackson
also, remove fatal2() which is just errx anyway. millert@ ok
2001-11-23use the same siginterrupt() trick in lpc(1) as in timedc(1). we have to hackTheo de Raadt
a global into the other programs since they share some source.
2001-08-30o kill registerTodd C. Miller
o add const to rcsid and copyright strings o placate -Wall
2001-02-15MAXLOGNAME; ianm@cit.uws.edu.auTheo de Raadt
2000-03-19Remove hard sentence breaks. Add $OpenBSD$ tags where appropriate. Some otherAaron Campbell
cleanup along the way.
2000-03-14Suffix "i.e." and "e.g." with a comma. Just another really picky man pageAaron Campbell
commit, as we want our documentation to be as consistently formatted as possible (it's getting there :-)).
1999-06-05remove trailing whitespace, some Nm cleanupAaron Campbell
1999-06-05more .Os cleansingAaron Campbell
1999-05-16Cleanup xrefs under SEE ALSO. Specifically:Alex Feldman
- Sort xrefs by section, and then alphabetically. - Add missing commas between xref items. - Remove commas from the last xref entry. - Remove duplicate entries.
1997-01-17Add OpenBSD tags (was in wrong dir for previous commit)Todd C. Miller
1996-05-15previous fix of NULL check reversedPer Fogelstrom
1996-05-06Missing ' == NULL)' added...Per Fogelstrom
1996-05-04correct -P, $PRINTER, and DEFLP interactions. bug reported by ↵Theo de Raadt
scott.burns@labatt.com
1995-10-18initial import of NetBSD treeTheo de Raadt