summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/common_source/startdaemon.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-3/+3
|
* Use AF_UNIX instead of AF_LOCAL.millert2015-10-271-3/+3
|
* Userspace doesn't need to use SUN_LEN(): connect() and bind() must acceptguenther2015-10-111-2/+2
| | | | | | | sizeof(struct sockaddr_un), so do the simple, portable thing. Also convert some strncpy() to strlcpy() 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)
* Make sure the correct errno is reported by warn* or err* and notguenther2014-07-201-2/+3
| | | | | | the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org)
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-9/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* remove #ifndef SUN_LEN; ok millert@stevesk2007-05-011-5/+2
|
* use warn() vs. perror() for consistency; ok millert@stevesk2007-05-011-3/+3
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* merge if() and foo = snprintf checks better; millert okderaadt2002-07-271-4/+4
|
* Remove setuid root from lp*. lpr needs to be setuid daemon so themillert2002-06-081-7/+7
| | | | | | | | | | | | | | | | 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-19/+19
| | | | | | | | | | | | | | | | 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
* use err/warn and friends instead of printf/exit.ericj2001-12-061-16/+5
| | | | | | 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-3/+14
| | | | a global into the other programs since they share some source.
* o kill registermillert2001-08-301-4/+4
| | | | | o add const to rcsid and copyright strings o placate -Wall
* Add OpenBSD tagsmillert1997-01-171-0/+6
|
* proactive bounds checking; help from millertderaadt1996-10-251-1/+4
|
* initial import of NetBSD treederaadt1995-10-181-0/+113