History log of /freebsd-current/contrib/tcp_wrappers/hosts_access.c
Revision Date Author Comments
# 1d9722de 20-Jul-2023 Gleb Smirnoff <glebius@FreeBSD.org>

tcp_wrappers: recognize IPv6 addresses/prefixes

Intentionally or not, but the libwrap was written in such manner that
if your /etc/hosts.allow doesn't have any domain names, neither smart
keywords like LOCAL or KNOWN, then it will not try to resolve the
client address during the hosts check. This was achieved with the
NOT_INADDR() check that matched IPv4 addresses/prefixes. Extend this
to also skip resolve if client list token looks like IPv6.

Reviewed by: philip, emaste
PR: 269456
Differential revision: https://reviews.freebsd.org/D40070


# 14f102ea 21-Mar-2023 Ed Maste <emaste@FreeBSD.org>

tcp_wrappers: Use ANSI (c89) function definitions

Although this code is in contrib/ there is no active upstream.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36047


# 9b6a8ee2 13-Feb-2022 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

tcp_wrappers: remove duplicate errno declarations


# 4dbd8c72 29-Sep-2021 Kyle Evans <kevans@FreeBSD.org>

tcp_wrappers: get rid of duplicate fgets declarations

This is declared in stdio.h, no need for this one.


# 068ad27d 17-Jul-2019 Brooks Davis <brooks@FreeBSD.org>

Use ANSI C function definitions and declerations.

Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA, AFRL


# 707dd2b1 30-Oct-2013 Sean Bruno <sbruno@FreeBSD.org>

Queisce warning about undeclared function usage.

yp_get_default_domain is defined in workaround.c but is not declared
in any header file. Tie the declaration to the same #define conditional
used when the function is called, NETGROUP


# 5375e4f8 30-Oct-2013 Sean Bruno <sbruno@FreeBSD.org>

Quiesce warning, which could be a bug IMO, by correctly defining the host_info
structure name


# 46bcf11d 30-Oct-2013 Sean Bruno <sbruno@FreeBSD.org>

Quiesce warnings by updating headerfile includes


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 934f51ed 24-Mar-2010 Maxim Sobolev <sobomax@FreeBSD.org>

MFC: Allow comment in the middle of the line.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d594463f 08-Jan-2010 Maxim Sobolev <sobomax@FreeBSD.org>

Allow comment (#) to be placed anywhere in the line, not only at the
beginning, so it's consistent with other configuration files.

MFC after: 3 weeks


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 4f101318 13-May-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.


# b208ff84 14-Jul-2000 Hajimu UMEMOTO <ume@FreeBSD.org>

Add IPv6 scoped address support.
It enables us to control link-local connections by interface like
this:

ALL : [fe80::%ed0]/10 : allow
ALL : [fe80::]/10 : deny


# 8053080c 03-Feb-2000 Yoshinobu Inoue <shin@FreeBSD.org>

Missing tcp_wrapper IPv6 support seemed to be a bug, so commit it.

Now when tcp_wrapper is enabled by inetd -wW,
several accesses which should be permitted are refused only for IPv6,
if hostname is used to decide the host to be allowed.
IPv6 users will be just upset.

About security related concern.
-All extensions are wrapped by #ifdef INET6, so people can completely
disable the extension by recompile libwrap without INET6 option.
-Access via IPv6 is not enabled by default.
People need to enable IPv6 access by changing /etc/inetd.conf at first,
by adding tcp6 and/or tcp46 entries.
-The base of patches are from KAME package and are actually daily used
for more than a year in several Japanese IPv6 environments.
-Patches are reviewed by markm.

Approved by: jkh

Submitted by: Hajimu UMEMOTO <ume@mahoroba.org>
Reviewed by: markm
Obtained from: KAME project


# 99abb287 21-Sep-1999 Sheldon Hearn <sheldonh@FreeBSD.org>

Add the ``blacklist'' feature, which allows a path to a filename to
be used as a valid pattern in the access control language.

Patch obtained from ftp://ftp.porcupine.org/pub/security/ .

Requested by: markm


# 2aef6930 14-Mar-1999 Mark Murray <markm@FreeBSD.org>

Clean import of TCP-wrappers by Wietse Venema.
Rest of build to follow.