summaryrefslogtreecommitdiff
path: root/lib/libwrap
AgeCommit message (Collapse)Author
2021-03-18simplify expression, daemon is an array can't be NULL.christos
2021-03-13record the libblocklist dependencychristos
2021-03-07fix missing charschristos
2021-03-07Add blocklist support to libwrap which enables all programs using libwrapchristos
to block access from hosts we deny. (libwrap support from Greg A. Woods)
2020-03-30PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without ↵ryo
scope-id
2019-01-24remove the new check for tlen >= PTRDIFF_MAX. the priormrg
checks assure the condition is met and GCC7 is happy. suggested by kre.
2019-01-23And as long as we're attempting to achieve perfection in codekre
that is never going to be executed, let's also check for possible overflow in a sum that will never be computed...
2019-01-23There's no point setting errno, it is just overwritten by errkre
in the exit path ... this function never fails, it simply sometimes doesn't actually expand the %m and just leaves the format string intact. And declare variables at the head of their scope, not at some random place in the middle of the code, whatever C allows, that is just ugly.
2019-01-23limit allocation to PTRDIFF_T to appease gcc-7, from mrg@christos
2019-01-14Whitespace (indent with tabs, rather than spaces), and rearrange onekre
line that needed wrapping so it no longer does, and is (IMO) clearer. WHile here, note that this was created in 2019, not 2018, for the copyright notice... NFCI.
2019-01-13Always return from expandm() with errno unaltered, so on thekre
off chance it failed, there's still the possibility that whatever processes the result will be able to deal with the %m that would (presumably) be left in the format string. And as a frill, don't call strerror() until we know we are going to use its result (still call it only once, no matter how many %m's are in the format string).
2019-01-13check for *. integer overflow over ptrdiff. Pointed out by kre@christos
2019-01-12Make expandm() return a const char * so we can do away with __UNCONST()kre
and more importantly, so that we don't accidentally return a value that is a const char * in reality (pointer to read only string) as a char *.
2019-01-12Don't do %%m -> %%%m escaping, requested by gson@.christos
2019-01-12Return the buffer that has not been freed, so it can be later,kre
rather than the one that already was.
2019-01-12Provide an extra argument to store the returned pointer so we can usechristos
the function directly as the return format (before assigning it to a variable) to appease clang.
2019-01-11Use a utility function to expand %m correctly...christos
2019-01-11let's try one more time: prepare the format to pass to syslog insteadchristos
of trying to escape %m.
2019-01-11instead of handling %m inline, escape it.christos
2019-01-10delete unused variablechristos
2019-01-10PR/53851: Andreas Gustafsson: libwrap prints "m" instead of errnochristos
Handle %m inline if needed, otherwise vasprintf strips the %m and...
2017-07-03Remove workaround for ancient HTML generation code.wiz
2016-03-16change static to volatile.christos
2016-03-16Avoid setjmp clobbering.christos
2016-02-17PR/50823: David Binderman: Limit scanf widthchristos
2015-10-14these are syslog-likechristos
2012-03-22Add some more __dead as exposed by the recent WARN bumps.joerg
2012-03-22Format the diagnostic with vasprintf once and use plain syslog insteadjoerg
of messing with format strings.
2012-03-21Use C89 function definitionmatt
2009-01-11bump shared libraries.christos
2008-12-18Wietse Wenema's tcpd-blacklist-patch:christos
ftp://ftp.porcupine.org/pub/security/tcpd-blacklist-patch - If a host starts with a / treat it as a filename containing a list of hosts.
2008-05-29remove clause #3 from my license where there are no othermrg
copyright holders involved.
2007-05-28Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on thetls
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to various string and memory copy and set functions (as well as a few system calls and other miscellany) where known at function entry. RedHat has evidently built all "core system packages" with this option for some time. This option should be used at the top of Makefiles (or Makefile.inc where this is used for subdirectories) but after any setting of LIB. This is only useful for userland code, and cannot be used in libc or in any code which includes the libc internals, because it overrides certain libc functions with macros. Some effort has been made to make USE_FORT=yes work correctly for a full-system build by having the bsd.sys.mk logic disable the feature where it should not be used (libc, libssp iteself, the kernel) but no attempt has been made to build the entire system with USE_FORT and doing so will doubtless expose numerous bugs and misfeatures. Adjust the system build so that all programs and libraries that are setuid, directly handle network data (including serial comm data), perform authentication, or appear likely to have (or have a history of having) data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default, with the exception of libc, which cannot use USE_FORT and thus uses only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no per-directory or in a system build will disable if desired.
2006-05-09change (mostly) int to socklen_t. GCC 4 doesn't like that int andmrg
socklen_t are different signness.
2006-01-08Use ntohl(host_address) so that RBL lookups work on little-endian hosts.jdc
Tested on alpha, i386 and sparc64. Fixes PR lib/30402.
2005-09-24Use get*_r re-entrant functions and get rid of end*ent(). From John Nemeth.christos
2005-04-19getpw*_r() may return 0 and set pwd==NULLlukem
2005-04-10Use getpwnam_r; from John Nemethchristos
2005-01-10Only compile in IPv6 support if ${USE_INET6} != "no"lukem
MKINET6 is for providing IPv6 infrastructure. USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2004-09-07Replaced strncpy with strlcpy. Thanks to Peter Postma whojrf
pointed them our in PR #25762. Approved by christos@NetBSD.org.
2003-10-13Move Matt Green's code from a 4-clause to a 3-clause licence by removingagc
the advertising clause. Diffs provided in PR 22396 by Joel Baker, the changes were confirmed to the board by Matt Green.
2003-09-07Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.wiz
From jmc@openbsd.
2003-05-26protect from nasty PTR records which could be abused to workaround accessitojun
control: 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5
2003-03-30Only fill in the server and client sockaddr in the request ifthorpej
the fields are NULL.
2002-12-26If we're going to replace strtok() with strtok_r(), and the caller of thelukem
latter is invoked recursively, use static (instead of automatic) storage for the "last" pointer so that we remember where we're up to ... Fixes bug with hosts.deny rules such as "rpcbind: ALL EXCEPT some.domain".
2002-12-02avoid endless loop in xgets() when line in host access conf file is longerjdolecek
than BUFSIZ fixes PR lib/15025 by Trevin Beattie
2002-10-01New sentence, new line. From Robert Elz.wiz
2002-07-20Correct #ifdef'ed out usage of memsetmjl
2002-06-22use strtok_r, as strtok can interfere with other callers. from openbsditojun
2002-06-07type mismatchitojun