summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr
AgeCommit message (Collapse)Author
2024-04-23correct indentation; no functional changeJonathan Gray
ok tb@
2023-06-17"d" is the key character for DVI files, not "r";Jason McIntyre
from lennart jablonka ok millert
2022-12-28spelling fixes; from paul tagliamonteJason McIntyre
any parts of his diff not taken are noted on tech
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2022-10-10consistently use IPv4/IPv6; from jmc@Jonathan Gray
2022-02-18Avoid gendered language in man pages when not referring to a specificJonathan Gray
person. Rewrite or use singular they. ok thfr@ sthen@ daniel@ ian@ job@ kmos@ jcs@ ratchov@ phessler@ and others I'm likely missing on an earlier version. feedback tj@, feedback and ok jmc@
2021-10-24For open/openat, if the flags parameter does not contain O_CREAT, theTheo de Raadt
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
2021-03-08Add some references, most of these were removed when we stopped buildingJonathan Gray
and installing USD/SMM/PSD docs. jmc@ agrees with the direction, ok millert@ on an earlier diff
2021-01-19Fix the embedded scope hack. They way this was written is buggy since theClaudio Jeker
else does not skip enough of the original code. Instead use a temporary sockaddr pointer and adjust it to point to the sin6 one if an embedded scope was detected. OK jca@
2020-04-23 ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread;Jason McIntyre
2020-02-08correct Research Unix edition "appeared in" use in HISTORYJonathan Gray
Starting from "Combined Table of Contents" in Doug McIlroy's "A Research UNIX Reader" a table of which edition manuals appeared in. Checked against manuals from bitsavers/TUHS and source from TUHS where available. Ingo points out there are cases where something is included but not documented until a later release. bcd(6) v6 v7 printf(3) v2 v4 abort(3) v5 v6 system(3) v6 v7 fmod(3) v5 v6 ok schwarze@
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.Theo de Raadt
2018-04-26Use <fcntl.h> instead of <sys/file.h> for open() and friends.Philip Guenther
Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
2017-09-20Avoid overflow/truncation during string->integer converion by eliminatingPhilip Guenther
the 'int' temporary variable. problem reported by Jacob Zimmermann (jacobz (at) senseofsecurity.com.au) ok deraadt@
2016-12-28fix the remaining cases of .Xr with only one argumentIngo Schwarze
2016-11-22Fix printf of NULL for the FILTERERR case when the tempfile is emptyTodd C. Miller
or missing. From Sebastien Marie.
2016-03-17simplify previous; ok bentleyJason McIntyre
2016-03-17Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.Anthony J. Bentley
Previously behaviors were all over the map. This changes them to use COLUMNS first, and either terminal width or a hardcoded value (typically 80) as appropriate. ok deraadt@; man bits ok jmc@
2016-03-16More "(<blah> *)0" -> NULL, avoiding any stdarg functions.Kenneth R Westerback
Feedback millert@ kettenis@
2016-02-29Move ckqueue() to common_source/common.cJeremie Courreges-Anglas
Patch from Chris Bennett, ok tb@
2016-02-28Fix ghastly whitespace. From Chris Bennetttb
2016-01-29Remove code that has been disabled for almost 20 years:tb
No need for bauds structure, since handled by cfsetspeed. From Chris Bennett, thanks! ok millert@
2016-01-27Fix typo in comment. From Chris Bennett, thanks!tb
2016-01-12Move prototypes of local functions from lp.h to the .c files and maketb
functions static if possible. Move delay() to lpd/printjob.c and fix an annoying typo. ok deraadt@
2015-12-28build all lpr tools with -Werror-implicit-function-declarationSebastian Benoit
ok tb@
2015-12-19Remove NULL-check before free().mmcc
2015-11-17no more pac;Jason McIntyre
2015-11-17off to the bitbucket in the skyTheo de Raadt
2015-11-04replace setbuf with setvbuf, from Frederic NowakTed Unangst
2015-10-28Remove support for lpd.pid file. OK deraadt@Todd C. Miller
2015-10-27Use AF_UNIX instead of AF_LOCAL.Todd C. Miller
2015-10-11Userspace doesn't need to use SUN_LEN(): connect() and bind() must acceptPhilip Guenther
sizeof(struct sockaddr_un), so do the simple, portable thing. Also convert some strncpy() to strlcpy() ok deraadt@
2015-09-29unbreak tree.Theo de Raadt
add file millert missed, from a previous diff he mailed me. millert, please check if this is the right one.
2015-09-29Replace call to __ivaliduser_sa() with a pared down version thatTodd C. Miller
only checks the host name. This clears the way for removal of __ivaliduser_sa() and __ivaliduser() from libc. OK deraadt@
2015-09-12add missing .Ar macrosIngo Schwarze
2015-08-20stdlib.h is in scope; do not cast malloc/calloc/realloc*Theo de Raadt
2015-02-09clean up flags++ instances around getopt()Theo de Raadt
ok florian
2015-01-16Replace <sys/param.h> with <limits.h>Theo de Raadt
millert spotted the accidental <ctype.h> removal that caused binary change.
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-12-16Replace setpgrp(0, getpid()) with setpgid(0, 0). OK deraadt@ tedu@Todd C. Miller
2014-11-18Nuke more obvious #include duplications.Kenneth R Westerback
ok deraadt@ millert@ tedu@
2014-11-02use nanosleep() instead of select(); ok jsingTheo de Raadt
2014-10-17Remove chunk special-casing malloc(siz) for realloc(NULL, siz). BitTheo de Raadt
tricky, but note the remembered size is in bss.
2014-10-16reallocarray() obviouslyTheo de Raadt
2014-10-11Userland reallocarray() audit.Doug Hogan
Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@ (had same diff in tree)
2014-07-20Make sure the correct errno is reported by warn* or err* and notPhilip Guenther
the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org)
2014-07-12The hosts.lpd file must exist, or no permission is granted. Change theTheo de Raadt
the log messages to clarify the reason for the failure to clarify the condition. ok guenther
2014-05-21stat(2) on the spool file needs privileges. Fixes file size reported byPascal Stumpf
lpq -l. ok millert@
2014-05-20Use errc/warnc to simplify code.Philip Guenther
Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
2014-04-20Prevent lpd(8) from looking into hosts.equiv.Antoine Jacoutot
Access control is now done only using hosts.lpd. See lpd(8) for more information about the format of this file. "seems reasonable" tedu@ "looks good" deraadt@ ok sthen@