aboutsummaryrefslogtreecommitdiff
path: root/contrib/tcp_wrappers
Commit message (Collapse)AuthorAgeFilesLines
* Remove a duplicate global (rfc931_timeout).Brooks Davis2019-07-171-1/+0
| | | | | | | | | | | | It is declared here and in rfc931.c and unused here so keep that copy and discard this one. Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=350101
* Use headers instead of manual declerations of standard functions andBrooks Davis2019-07-175-14/+5
| | | | | | | variables. Notes: svn path=/head/; revision=350100
* Use ANSI C function definitions and declerations.Brooks Davis2019-07-1711-46/+42
| | | | | | | | | Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=350098
* Reduce the log level of tcpd_warn calls from ERR to WARNING.Bjoern A. Zeeb2018-08-231-1/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=338277
* remove bogus declaration of malloc from tcp_wrappersAndriy Gapon2017-06-201-4/+0
| | | | | | | | | | | | The declaration was already inactive when INET6 was enabled and it causes a build error in the other case because of a conflict with the correct definition in stdlib.h. Discussed with: dim, ume MFC after: 2 weeks Notes: svn path=/head/; revision=320151
* TCP Wrappers: tcpdchk (tcp wrapper configuration checker) and tcpdmatchSean Bruno2017-06-165-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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 Notes: svn path=/head/; revision=320033
* tcp_wrappers: Sprinkle some bounds-checked string copyingConrad Meyer2017-04-141-2/+2
| | | | | | | | | | | It isn't clear if tcpd.c is even compiled in FreeBSD. Reported by: Coverity CIDs: 1006710, 1006804 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=316803
* After r311459, some ports can break, because a few of the newly addedDimitry Andric2017-01-061-0/+5
| | | | | | | | | | | prototypes in <tcpd.h> use FILE. Pull in a minimal forward declaration of FILE from <stdio.h> to minimize impact. Sorry for the breakage. Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> X-MFC-With: r311459 Notes: svn path=/head/; revision=311556
* Also remove unnecessary extern keywords from tcpd.h.Dimitry Andric2017-01-051-35/+35
| | | | | | | | Noticed by: kib X-MFC-With: r311459 Notes: svn path=/head/; revision=311461
* Put proper prototypes in tcpd.hDimitry Andric2017-01-052-58/+41
| | | | | | | | | | | | | | | | | | | Clang 4.0.0 complains about tcpd.h's not-really-prototypes, e.g.: /usr/include/tcpd.h:75:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] extern int hosts_access(); /* access control */ ^ To fix this, turn these declarations into real prototypes. While here, garbage collect the incompatible rfc931() function from scaffold.c, as it is never used. Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9052 Notes: svn path=/head/; revision=311459
* tcpd.h: add prototype for hosts_ctlPedro F. Giffuni2014-10-111-0/+1
| | | | | | | | | | | | | | | According the hosts_access(3) man page the hosts_ctl() prototype should be in tcpd.h. For now, follow other declarations and don't add the arguments in the prototype. Reference: https://www.illumos.org/issues/4385 PR: 32808 MFC after: 2 weeks Notes: svn path=/head/; revision=272950
* tcpd: complete function prototypes.Pedro F. Giffuni2014-10-114-48/+48
| | | | | | | | | | | | This clears up at least a build issues on mysql-server ports. While here also replace some spaces with tabs in our headers. PR: 42336 MFC after: 2 weeks Notes: svn path=/head/; revision=272949
* Queisce warning about undeclared function usage.Sean Bruno2013-10-301-0/+5
| | | | | | | | | 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 Notes: svn path=/head/; revision=257406
* Quiesce warning, which could be a bug IMO, by correctly defining the host_infoSean Bruno2013-10-301-1/+1
| | | | | | | structure name Notes: svn path=/head/; revision=257405
* Quiesce two warnings:Sean Bruno2013-10-301-6/+11
| | | | | | | | | | | | 1. define the CODE * as const 2. restructure function to eliminate warning about exiting with no return. severity_map() never returns when it can't find an appropriate sysylog facility, and it longjmp()'s away into error code handling. Keep this behavior by stashing the facility value found during our search and checking for -1 if found. Notes: svn path=/head/; revision=257404
* Quiesce warnings by updating headerfile includesSean Bruno2013-10-307-0/+10
| | | | Notes: svn path=/head/; revision=257398
* Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS inEitan Adler2012-12-061-2/+2
| | | | | | | | | | | | | | | share/mk/sys.mk instead. This is part of a medium term project to permit deterministic builds of FreeBSD. Submitted by: Erik Cederstrand <erik@cederstrand.dk> Reviewed by: imp, toolchain@ Approved by: cperciva MFC after: 2 weeks Notes: svn path=/head/; revision=243933
* Make these files compile with clang.Rui Paulo2010-07-221-0/+1
| | | | | | | Submitted by: Dimitry Andric <dimitry at andric.com> Notes: svn path=/head/; revision=210386
* Allow comment (#) to be placed anywhere in the line, not only at theMaxim Sobolev2010-01-081-1/+11
| | | | | | | | | beginning, so it's consistent with other configuration files. MFC after: 3 weeks Notes: svn path=/head/; revision=201782
* NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 definesHajimu UMEMOTO2005-05-132-12/+4
| | | | | | | | NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now. Notes: svn path=/head/; revision=146187
* Correct compilation with "#define really_paranoid".Ceri Davies2003-12-271-1/+1
| | | | | | | | PR: bin/59674 Submitted by: Vaclav Rehak <vasek@zoom-int.cz> Notes: svn path=/head/; revision=123895
* Add a declaration that malloc() returns a pointer, not an int. OtherwisePeter Wemm2003-01-081-0/+2
| | | | | | | | this segfaults on ia64. (Cannot cast an int to a pointer). The rest of the code does it this way rather than use system includes.... Notes: svn path=/head/; revision=108930
* This commit was generated by cvs2svn to compensate for changes in r80260,Kris Kennaway2001-07-241-3/+18
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=80261
| * Import updated/clarified license for tcp_wrappers.vendor/tcp_wrappersKris Kennaway2001-07-241-3/+18
| | | | | | | | | | | | | | | | | | | | | | +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that this entire copyright notice +* is duplicated in all such copies. Obtained from: ftp://ftp.porcupine.org/pub/security/tcp_wrappers_license Notes: svn path=/vendor/tcp_wrappers/dist/; revision=80260
* | Unbreak "paranoid" host checking, which was broken with the IPv6 codeKris Kennaway2001-07-041-1/+1
| | | | | | | | | | | | | | | | | | import. Submitted by: Tony Finch <dot@dotat.at> Notes: svn path=/head/; revision=79249
* | Make tcpwrappers use the magic in syslog.h for getting syslog facilityDavid Malone2001-01-141-100/+10
| | | | | | | | | | | | | | | | | | | | | | | | and level names. Add FreeBSD tag. PR: 24218 Approved by: markm Notes: svn path=/head/; revision=71045
* | - reject numeric addressHajimu UMEMOTO2000-09-251-0/+22
| | | | | | | | | | | | | | | | | | | | | | - validate scope in sockaddr comparison logic patch was originally submitted by itojun and slightly modified by me. Reviewed by: itojun, kris Notes: svn path=/head/; revision=66329
* | Don't touch ai_canonname without checking NULL. CurrentHajimu UMEMOTO2000-09-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | implementation of getaddrinfo() may return NULL ai_canonname. There is no consensus how getaddrinfo() should fill ai_canonname when numeric hostname is given. Reported by: kris Notes: svn path=/head/; revision=66297
* | Add IPv6 scoped address support.Hajimu UMEMOTO2000-07-146-319/+296
| | | | | | | | | | | | | | | | | | | | | | It enables us to control link-local connections by interface like this: ALL : [fe80::%ed0]/10 : allow ALL : [fe80::]/10 : deny Notes: svn path=/head/; revision=63158
* | Stop the tcp_wrappers ident code sending a request which is splitDavid Malone2000-07-141-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | across several packets. This is done by not turning off buffering on the stdio stream for the ident connection. Originally this was done to avoid reading back what you'd just written into the buffer. However ANSI C gives a list of functions which should allow you to safely change direction on a stdio stream, and Wietse found that fseek seemed to be the most portable. The original patch used a different workaround, but this should be a real fix. PR: 16086 Reviewed by: wietse@porcupine.org (Original version) Approved by: markm Notes: svn path=/head/; revision=63152
* | Missing tcp_wrapper IPv6 support seemed to be a bug, so commit it.Yoshinobu Inoue2000-02-0316-12/+727
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=56977
* | Add the ``blacklist'' feature, which allows a path to a filename toSheldon Hearn1999-09-213-1/+65
| | | | | | | | | | | | | | | | | | | | | | be used as a valid pattern in the access control language. Patch obtained from ftp://ftp.porcupine.org/pub/security/ . Requested by: markm Notes: svn path=/head/; revision=51495
* | Since our inetd wrapped now, treat all its services as tcpd-prefixedAndrey A. Chernov1999-04-031-0/+4
|/ | | | | | | for tcpdchk Notes: svn path=/head/; revision=45256
* Clean import of TCP-wrappers by Wietse Venema.vendor/tcp_wrappers/7.6Mark Murray1999-03-1456-0/+9731
Rest of build to follow. Notes: svn path=/vendor/tcp_wrappers/dist/; revision=44743 svn path=/vendor/tcp_wrappers/7.6/; revision=44745; tag=vendor/tcp_wrappers/7.6