diff options
author | lkoeller <lkoeller@FreeBSD.org> | 2001-12-06 05:15:26 +0800 |
---|---|---|
committer | lkoeller <lkoeller@FreeBSD.org> | 2001-12-06 05:15:26 +0800 |
commit | 9b02502ab90ebef10340effdf111220d4a07288d (patch) | |
tree | 08c141f9dfbe21560869deb8e49b0063bfc9215c /sysutils/apcupsd/files | |
parent | 9f9e91d7b7f1db01b7f3c789a03a23bcbc56962d (diff) | |
download | freebsd-ports-gnome-9b02502ab90ebef10340effdf111220d4a07288d.tar.gz freebsd-ports-gnome-9b02502ab90ebef10340effdf111220d4a07288d.tar.zst freebsd-ports-gnome-9b02502ab90ebef10340effdf111220d4a07288d.zip |
* Add missing patch file to compile correctly with libwrap
* Use --disable-install-distdir instead of patching Makefile
* Bump port revision
Diffstat (limited to 'sysutils/apcupsd/files')
-rw-r--r-- | sysutils/apcupsd/files/patch-ab | 17 | ||||
-rw-r--r-- | sysutils/apcupsd/files/patch-ac | 64 |
2 files changed, 64 insertions, 17 deletions
diff --git a/sysutils/apcupsd/files/patch-ab b/sysutils/apcupsd/files/patch-ab index 2c4847cf9d5b..a55ca19eba17 100644 --- a/sysutils/apcupsd/files/patch-ab +++ b/sysutils/apcupsd/files/patch-ab @@ -1,23 +1,6 @@ *** Makefile.in.orig Sat Nov 24 09:23:03 2001 --- Makefile.in Sun Dec 2 11:47:56 2001 *************** -*** 196,202 **** - install-: - $(MAKE) dummy - -! install: install-apcupsd@WIN32@ install-@POWERFLUTE@ install-cgi @INSTALL_DISTDIR@ - - install-powerflute: powerflute - @echo "Installing powerflute binary..." ---- 196,202 ---- - install-: - $(MAKE) dummy - -! install: install-apcupsd@WIN32@ install-@POWERFLUTE@ install-cgi - - install-powerflute: powerflute - @echo "Installing powerflute binary..." -*************** *** 219,249 **** @echo "Installing apcaccess binary..." $(INSTALL_PROGRAM) $(srcdir)/apcaccess $(sbindir)/apcaccess diff --git a/sysutils/apcupsd/files/patch-ac b/sysutils/apcupsd/files/patch-ac new file mode 100644 index 000000000000..23e0cf5d7dee --- /dev/null +++ b/sysutils/apcupsd/files/patch-ac @@ -0,0 +1,64 @@ +*** apcnisd.c.orig Sat Apr 28 09:12:05 2001 +--- apcnisd.c Mon Dec 3 22:05:08 2001 +*************** +*** 68,79 **** +--- 68,84 ---- + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> ++ #ifdef HAVE_LIBWRAP ++ #include <tcpd.h> ++ #endif + + #define NETD_VERSION "1.0" + + char *pname; + + UPSINFO myUPS; ++ UPSINFO *core_ups = &myUPS;; ++ char argvalue[MAXSTRING]; + static char largebuf[4096]; + static int stat_recs; + static int logstats = 0; +*************** +*** 82,87 **** +--- 87,124 ---- + void handle_client_request(); + int do_daemon(int argc, char *argv[]); + int do_inetd(int argc, char *argv[]); ++ int check_wrappers(char *av, int newsock); ++ ++ #ifdef HAVE_LIBWRAP ++ int allow_severity = LOG_INFO; ++ int deny_severity = LOG_WARNING; ++ ++ int check_wrappers(char *av, int newsock) ++ { ++ struct request_info req; ++ char *av0; ++ ++ if (strchr(av, '/')) ++ av0 = strrchr(av, '/'); ++ else ++ av0 = av; ++ ++ request_init(&req, RQ_DAEMON, av0, RQ_FILE, newsock, NULL); ++ fromhost(&req); ++ if (!hosts_access(&req)) { ++ log_event(core_ups, LOG_WARNING, ++ _("Connection from %.500s refused by tcp_wrappers."), ++ eval_client(&req)); ++ return FAILURE; ++ } ++ #ifdef I_WANT_LOTS_OF_LOGGING ++ log_event(core_ups, LOG_NOTICE, "connect from %.500s", eval_client(&req)); ++ #endif ++ return SUCCESS; ++ } ++ ++ #endif /* HAVE_LIBWRAP */ ++ + + void error_cleanup(UPSINFO *ups) + { + |