Update to 3.14.14
PR: 210129 Submitted by: nevecherya@gmail.com Approved by: maintainer-timeout (itetcu)
This commit is contained in:
parent
453a5e108d
commit
bf1576f42d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=427764
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= apcupsd
|
||||
PORTVERSION= 3.14.13
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 3.14.14
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20-%20Stable/${PORTVERSION}
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (apcupsd-3.14.13.tar.gz) = 57ecbde01d0448bf8c4dbfe0ad016724ae66ab98adf2de955bf2be553c5d03f9
|
||||
SIZE (apcupsd-3.14.13.tar.gz) = 1935043
|
||||
TIMESTAMP = 1480843790
|
||||
SHA256 (apcupsd-3.14.14.tar.gz) = db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867
|
||||
SIZE (apcupsd-3.14.14.tar.gz) = 1843409
|
||||
|
@ -1,9 +1,28 @@
|
||||
--- configure.orig 2015-01-04 20:35:43 UTC
|
||||
--- configure.orig 2016-04-18 20:26:31 UTC
|
||||
+++ configure
|
||||
@@ -12678,53 +12678,6 @@ $as_echo "$as_me: error: gethostbyname_r
|
||||
@@ -10584,7 +10584,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
- #include <tcpd.h>
|
||||
+ #include "tcpd.h"
|
||||
int deny_severity = 0;
|
||||
int allow_severity = 0;
|
||||
struct request_info *req;
|
||||
@@ -10636,7 +10636,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
- #include <tcpd.h>
|
||||
+ #include "tcpd.h"
|
||||
int deny_severity = 0;
|
||||
int allow_severity = 0;
|
||||
struct request_info *req;
|
||||
@@ -12397,55 +12397,6 @@ $as_echo "$as_me: error: gethostbyname_r
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$GCC"; then
|
||||
-if test -n "$GCC"; then
|
||||
- # Starting with GCC 3.0, you must link C++ programs against either
|
||||
- # libstdc++ (shared by default), or libsupc++ (always static). If
|
||||
- # you care about binary portability between Linux distributions,
|
||||
@ -50,7 +69,8 @@
|
||||
- esac
|
||||
- ;;
|
||||
- esac
|
||||
-fi
|
||||
-
|
||||
# See if GCC supports -fno-exceptions...
|
||||
{ $as_echo "$as_me:$LINENO: checking if GCC supports -fno-exceptions" >&5
|
||||
$as_echo_n "checking if GCC supports -fno-exceptions... " >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: checking whether C compiler accepts -fno-exceptions" >&5
|
||||
$as_echo_n "checking whether C compiler accepts -fno-exceptions... " >&6; }
|
||||
if test "${ax_cv_check_cflags___fno_exceptions+set}" = set; then
|
||||
|
17
sysutils/apcupsd/files/patch-include_apc.h
Normal file
17
sysutils/apcupsd/files/patch-include_apc.h
Normal file
@ -0,0 +1,17 @@
|
||||
--- include/apc.h.orig 2015-02-17 20:18:17 UTC
|
||||
+++ include/apc.h
|
||||
@@ -148,13 +148,7 @@
|
||||
/* System includes conditionally included */
|
||||
|
||||
#ifdef HAVE_LIBWRAP
|
||||
-# ifdef __cplusplus
|
||||
- extern "C" {
|
||||
-# endif
|
||||
-# include <tcpd.h>
|
||||
-# ifdef __cplusplus
|
||||
- };
|
||||
-# endif
|
||||
+# include "tcpd.h"
|
||||
#endif
|
||||
|
||||
#endif
|
238
sysutils/apcupsd/files/patch-include_tcpd.h
Normal file
238
sysutils/apcupsd/files/patch-include_tcpd.h
Normal file
@ -0,0 +1,238 @@
|
||||
--- include/tcpd.h.orig 2016-06-15 10:03:22 UTC
|
||||
+++ include/tcpd.h
|
||||
@@ -0,0 +1,235 @@
|
||||
+ /*
|
||||
+ * @(#) tcpd.h 1.5 96/03/19 16:22:24
|
||||
+ *
|
||||
+ * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * This version of the file has been hacked over by
|
||||
+ * Kern Sibbald to make it compatible with C++ for
|
||||
+ * the few functions that Bacula uses. 19 April 2002
|
||||
+ * It now compiles with C++ but remains untested.
|
||||
+ * A correct fix would require significantly more work.
|
||||
+ */
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
+/* Structure to describe one communications endpoint. */
|
||||
+
|
||||
+#define STRING_LENGTH 128 /* hosts, users, processes */
|
||||
+
|
||||
+struct host_info {
|
||||
+ char name[STRING_LENGTH]; /* access via eval_hostname(host) */
|
||||
+ char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */
|
||||
+ struct sockaddr_in *sin; /* socket address or 0 */
|
||||
+ struct t_unitdata *unit; /* TLI transport address or 0 */
|
||||
+ struct request_info *request; /* for shared information */
|
||||
+};
|
||||
+
|
||||
+/* Structure to describe what we know about a service request. */
|
||||
+
|
||||
+struct request_info {
|
||||
+ int fd; /* socket handle */
|
||||
+ char user[STRING_LENGTH]; /* access via eval_user(request) */
|
||||
+ char daemon[STRING_LENGTH]; /* access via eval_daemon(request) */
|
||||
+ char pid[10]; /* access via eval_pid(request) */
|
||||
+ struct host_info client[1]; /* client endpoint info */
|
||||
+ struct host_info server[1]; /* server endpoint info */
|
||||
+ void (*sink) (void); /* datagram sink function or 0 */
|
||||
+ void (*hostname) (void); /* address to printable hostname */
|
||||
+ void (*hostaddr) (void); /* address to printable address */
|
||||
+ void (*cleanup) (void); /* cleanup function or 0 */
|
||||
+ struct netconfig *config; /* netdir handle */
|
||||
+};
|
||||
+
|
||||
+/* Common string operations. Less clutter should be more readable. */
|
||||
+
|
||||
+#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; }
|
||||
+
|
||||
+#define STRN_EQ(x,y,l) (strncasecmp((x),(y),(l)) == 0)
|
||||
+#define STRN_NE(x,y,l) (strncasecmp((x),(y),(l)) != 0)
|
||||
+#define STR_EQ(x,y) (strcasecmp((x),(y)) == 0)
|
||||
+#define STR_NE(x,y) (strcasecmp((x),(y)) != 0)
|
||||
+
|
||||
+ /*
|
||||
+ * Initially, all above strings have the empty value. Information that
|
||||
+ * cannot be determined at runtime is set to "unknown", so that we can
|
||||
+ * distinguish between `unavailable' and `not yet looked up'. A hostname
|
||||
+ * that we do not believe in is set to "paranoid".
|
||||
+ */
|
||||
+
|
||||
+#define STRING_UNKNOWN "unknown" /* lookup failed */
|
||||
+#define STRING_PARANOID "paranoid" /* hostname conflict */
|
||||
+
|
||||
+extern char unknown[];
|
||||
+extern char paranoid[];
|
||||
+
|
||||
+#define HOSTNAME_KNOWN(s) (STR_NE((s),unknown) && STR_NE((s),paranoid))
|
||||
+
|
||||
+#define NOT_INADDR(s) (s[strspn(s,"01234567890./")] != 0)
|
||||
+
|
||||
+/* Global functions. */
|
||||
+
|
||||
+#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
|
||||
+extern void fromhost(); /* get/validate client host info */
|
||||
+#else
|
||||
+#define fromhost sock_host /* no TLI support needed */
|
||||
+#endif
|
||||
+
|
||||
+extern int hosts_access(struct request_info *); /* access control */
|
||||
+extern void shell_cmd(void); /* execute shell command */
|
||||
+extern char *percent_x(void); /* do %<char> expansion */
|
||||
+extern void rfc931(void); /* client name from RFC 931 daemon */
|
||||
+extern void clean_exit(void); /* clean up and exit */
|
||||
+extern void refuse(void); /* clean up and exit */
|
||||
+extern char *xgets(void); /* fgets() on steroids */
|
||||
+extern char *split_at(void); /* strchr() and split */
|
||||
+extern unsigned long dot_quad_addr(void); /* restricted inet_addr() */
|
||||
+
|
||||
+/* Global variables. */
|
||||
+
|
||||
+extern int allow_severity; /* for connection logging */
|
||||
+extern int deny_severity; /* for connection logging */
|
||||
+extern char *hosts_allow_table; /* for verification mode redirection */
|
||||
+extern char *hosts_deny_table; /* for verification mode redirection */
|
||||
+extern int hosts_access_verbose; /* for verbose matching mode */
|
||||
+extern int rfc931_timeout; /* user lookup timeout */
|
||||
+extern int resident; /* > 0 if resident process */
|
||||
+
|
||||
+ /*
|
||||
+ * Routines for controlled initialization and update of request structure
|
||||
+ * attributes. Each attribute has its own key.
|
||||
+ */
|
||||
+
|
||||
+#ifdef __STDC__
|
||||
+extern struct request_info *request_init(struct request_info *,...);
|
||||
+extern struct request_info *request_set(struct request_info *,...);
|
||||
+#else
|
||||
+extern struct request_info *request_init(); /* initialize request */
|
||||
+extern struct request_info *request_set(); /* update request structure */
|
||||
+#endif
|
||||
+
|
||||
+#define RQ_FILE 1 /* file descriptor */
|
||||
+#define RQ_DAEMON 2 /* server process (argv[0]) */
|
||||
+#define RQ_USER 3 /* client user name */
|
||||
+#define RQ_CLIENT_NAME 4 /* client host name */
|
||||
+#define RQ_CLIENT_ADDR 5 /* client host address */
|
||||
+#define RQ_CLIENT_SIN 6 /* client endpoint (internal) */
|
||||
+#define RQ_SERVER_NAME 7 /* server host name */
|
||||
+#define RQ_SERVER_ADDR 8 /* server host address */
|
||||
+#define RQ_SERVER_SIN 9 /* server endpoint (internal) */
|
||||
+
|
||||
+ /*
|
||||
+ * Routines for delayed evaluation of request attributes. Each attribute
|
||||
+ * type has its own access method. The trivial ones are implemented by
|
||||
+ * macros. The other ones are wrappers around the transport-specific host
|
||||
+ * name, address, and client user lookup methods. The request_info and
|
||||
+ * host_info structures serve as caches for the lookup results.
|
||||
+ */
|
||||
+
|
||||
+extern char *eval_user(void); /* client user */
|
||||
+extern char *eval_hostname(void); /* printable hostname */
|
||||
+extern char *eval_hostaddr(void); /* printable host address */
|
||||
+extern char *eval_hostinfo(void); /* host name or address */
|
||||
+extern char *eval_client(struct request_info *); /* whatever is available */
|
||||
+extern char *eval_server(void); /* whatever is available */
|
||||
+#define eval_daemon(r) ((r)->daemon) /* daemon process name */
|
||||
+#define eval_pid(r) ((r)->pid) /* process id */
|
||||
+
|
||||
+/* Socket-specific methods, including DNS hostname lookups. */
|
||||
+
|
||||
+extern void sock_host(struct request_info *);
|
||||
+extern void sock_hostname(void); /* translate address to hostname */
|
||||
+extern void sock_hostaddr(void); /* address to printable address */
|
||||
+#define sock_methods(r) \
|
||||
+ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
|
||||
+
|
||||
+/* The System V Transport-Level Interface (TLI) interface. */
|
||||
+
|
||||
+#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
|
||||
+extern void tli_host(); /* look up endpoint addresses etc. */
|
||||
+#endif
|
||||
+
|
||||
+ /*
|
||||
+ * Problem reporting interface. Additional file/line context is reported
|
||||
+ * when available. The jump buffer (tcpd_buf) is not declared here, or
|
||||
+ * everyone would have to include <setjmp.h>.
|
||||
+ */
|
||||
+
|
||||
+#ifdef __STDC__
|
||||
+extern void tcpd_warn(char *, ...); /* report problem and proceed */
|
||||
+extern void tcpd_jump(char *, ...); /* report problem and jump */
|
||||
+#else
|
||||
+extern void tcpd_warn();
|
||||
+extern void tcpd_jump();
|
||||
+#endif
|
||||
+
|
||||
+struct tcpd_context {
|
||||
+ char *file; /* current file */
|
||||
+ int line; /* current line */
|
||||
+};
|
||||
+extern struct tcpd_context tcpd_context;
|
||||
+
|
||||
+ /*
|
||||
+ * While processing access control rules, error conditions are handled by
|
||||
+ * jumping back into the hosts_access() routine. This is cleaner than
|
||||
+ * checking the return value of each and every silly little function. The
|
||||
+ * (-1) returns are here because zero is already taken by longjmp().
|
||||
+ */
|
||||
+
|
||||
+#define AC_PERMIT 1 /* permit access */
|
||||
+#define AC_DENY (-1) /* deny_access */
|
||||
+#define AC_ERROR AC_DENY /* XXX */
|
||||
+
|
||||
+ /*
|
||||
+ * In verification mode an option function should just say what it would do,
|
||||
+ * instead of really doing it. An option function that would not return
|
||||
+ * should clear the dry_run flag to inform the caller of this unusual
|
||||
+ * behavior.
|
||||
+ */
|
||||
+
|
||||
+extern void process_options(void); /* execute options */
|
||||
+extern int dry_run; /* verification flag */
|
||||
+
|
||||
+/* Bug workarounds. */
|
||||
+
|
||||
+#ifdef INET_ADDR_BUG /* inet_addr() returns struct */
|
||||
+#define inet_addr fix_inet_addr
|
||||
+extern long fix_inet_addr(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef BROKEN_FGETS /* partial reads from sockets */
|
||||
+#define fgets fix_fgets
|
||||
+extern char *fix_fgets(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef RECVFROM_BUG /* no address family info */
|
||||
+#define recvfrom fix_recvfrom
|
||||
+extern int fix_recvfrom(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef GETPEERNAME_BUG /* claims success with UDP */
|
||||
+#define getpeername fix_getpeername
|
||||
+extern int fix_getpeername(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */
|
||||
+#define gethostbyname fix_gethostbyname
|
||||
+extern struct hostent *fix_gethostbyname(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef USE_STRSEP /* libc calls strtok(void) */
|
||||
+#define strtok fix_strtok
|
||||
+extern char *fix_strtok(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */
|
||||
+#define strtok my_strtok
|
||||
+extern char *my_strtok(void);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
Loading…
Reference in New Issue
Block a user