diff options
author | Max Kellermann <max@musicpd.org> | 2018-12-28 14:16:02 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-12-28 14:16:02 +0100 |
commit | 22e6d95c4bbae15dd7f635eabe5fdde1ce06ba73 (patch) | |
tree | 30015237746efc3de22232ac012c2acf57ece4fb /src/client | |
parent | 1c7bd7d5c4ff7afaecf4a68978ae53e9d2094026 (diff) |
remove libwrap support
libwrap is an obscure artefact from a past long ago, when source IP
address meant something.
And its API is "interesting"; it requires the application to expose
two global variables `allow_severity` and `deny_severity`. This led
to bug #437. I don't want to declare those variables; instead, I'd
like to remove libwrap support.
Closes #437
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/ClientNew.cxx | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/client/ClientNew.cxx b/src/client/ClientNew.cxx index d7fab2a9c..85ce97aa3 100644 --- a/src/client/ClientNew.cxx +++ b/src/client/ClientNew.cxx @@ -35,10 +35,6 @@ #include <sys/socket.h> #endif -#ifdef HAVE_LIBWRAP -#include <tcpd.h> -#endif - static constexpr char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n"; Client::Client(EventLoop &_loop, Partition &_partition, @@ -66,27 +62,6 @@ client_new(EventLoop &loop, Partition &partition, assert(fd.IsDefined()); -#ifdef HAVE_LIBWRAP - if (address.GetFamily() != AF_LOCAL) { - // TODO: shall we obtain the program name from argv[0]? - const char *progname = "mpd"; - - struct request_info req; - request_init(&req, RQ_FILE, fd.Get(), RQ_DAEMON, progname, 0); - - fromhost(&req); - - if (!hosts_access(&req)) { - /* tcp wrappers says no */ - FormatWarning(client_domain, - "libwrap refused connection (libwrap=%s) from %s", - progname, remote.c_str()); - - return; - } - } -#endif /* HAVE_WRAP */ - ClientList &client_list = *partition.instance.client_list; if (client_list.IsFull()) { LogWarning(client_domain, "Max connections reached"); |