History log of /freebsd-11-stable/contrib/tcp_wrappers/hosts_access.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 350345 26-Jul-2019 brooks

MFC r316803,320033,338277,350098,350100-350101

r316803:
tcp_wrappers: Sprinkle some bounds-checked string copying

Reported by: Coverity
CIDs: 1006710, 1006804
Sponsored by: Dell EMC Isilon

r320033:
TCP Wrappers: tcpdchk (tcp wrapper configuration checker) and tcpdmatch
(tcp wrapper oracle) warning fixes via edits to the C code files

contrib/tcp_wrappers/fakelog.c
Warnings for each of functions: openlog( ), vsyslog( ), VARARGS( ),
closelog( )
warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
warning: control reaches end of non-void function [-Wreturn-type]
Fixes:
Explicitly added specification of function type to void for each
function, suppressing both warnings for each function listed
contrib/tcp_wrappers/inetcf.c
Warnings:
warning: incompativle redeclaration of library function 'malloc'
note: 'malloc' is a builtin with type 'void *(unsigned long)'
warning: implicit declaration of function 'check_path' is invalid in C99
[-Wimplicit-function-declaration]
Fixes:
Removed redeclaration of malloc on line 21
Included library <stdlib.h> in the code which contains the malloc( )
function in it's library
Included scaffold.h header file in the code that contains check-path( )
function
contrib/tcp_wrappers/scaffold.c
Warnings:
warning: implicitly declaring library function 'exit' with type
'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
note: include the header <stdlib.h> or explicitly provide a declaration
for 'exit'
Fixes:
Included <stdlib.h> in the code which contains the exit( ) function in
it's library
contrib/tcp_wrappers/tcpdchk.c
Warnings:
warning: implicit declaration of function 'getopt' is invalid
in C99 [-Wimplicit-function-declaration]
warning: implicit declaration of function 'atoi' is invalid
in C99 [-Wimplicit-function-declaration]
Fixes:
Included the specific function <getopt.h> library to the code
Included<stdlib.h> to the code which contains the atoi( ) function in
the library
contrib/tcp_wrappers/tcpdmatch.c
Warnings:
warning: implicit declaration of function 'getopt' is invalid in C99
[-Wimplicit-function-declaration]
Fixes:
Included<stdlib.h> to the code which contains the getopt( ) function in
the library

Submitted by: Aaron Prieger <aprieger@llnw.com>
Reviewed by: vangyzen
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D10995

r338277:
Reduce the log level of tcpd_warn calls from ERR to WARNING.
This matches the name and avoids logging of warnings to console with
default syslog.conf, esp. getting rid of:
warning: /etc/hosts.allow, line ..: can't verify hostname: \
getaddrinfo(.., AF_INET) failed

r350098:
Use ANSI C function definitions and declerations.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

r350100:
Use headers instead of manual declerations of standard functions and
variables.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

r350101:
Remove a duplicate global (rfc931_timeout).

It is declared here and in rfc931.c and unused here so keep that copy
and discard this one.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 257406 30-Oct-2013 sbruno

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


# 257405 30-Oct-2013 sbruno

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


# 257398 30-Oct-2013 sbruno

Quiesce warnings by updating headerfile includes


# 201782 08-Jan-2010 sobomax

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


# 146187 13-May-2005 ume

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


# 63158 14-Jul-2000 ume

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


# 56977 03-Feb-2000 shin

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


# 51495 21-Sep-1999 sheldonh

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


# 44744 14-Mar-1999 markm

This commit was generated by cvs2svn to compensate for changes in r44743,
which included commits to RCS files with non-trunk default branches.


# 44743 14-Mar-1999 markm

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