aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net-mgmt/arpwatch-devel/Makefile2
-rw-r--r--net-mgmt/arpwatch-devel/files/patch-ah41
-rw-r--r--net-mgmt/arpwatch/Makefile2
-rw-r--r--net-mgmt/arpwatch/files/patch-ah41
-rw-r--r--net/arpwatch-devel/Makefile2
-rw-r--r--net/arpwatch-devel/files/patch-ah41
-rw-r--r--net/arpwatch/Makefile2
-rw-r--r--net/arpwatch/files/patch-ah41
8 files changed, 156 insertions, 16 deletions
diff --git a/net-mgmt/arpwatch-devel/Makefile b/net-mgmt/arpwatch-devel/Makefile
index 50030469973..74f25956d9a 100644
--- a/net-mgmt/arpwatch-devel/Makefile
+++ b/net-mgmt/arpwatch-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/
diff --git a/net-mgmt/arpwatch-devel/files/patch-ah b/net-mgmt/arpwatch-devel/files/patch-ah
index 0dd2433a689..b292b25116d 100644
--- a/net-mgmt/arpwatch-devel/files/patch-ah
+++ b/net-mgmt/arpwatch-devel/files/patch-ah
@@ -1,6 +1,15 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
-+++ report.c Thu Feb 22 22:47:29 2001
-@@ -70,6 +70,8 @@
++++ report.c Thu May 16 11:34:33 2002
+@@ -45,6 +45,8 @@
+
+ #include <ctype.h>
+ #include <errno.h>
++#include <fcntl.h>
++#include <paths.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -70,6 +72,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
@@ -9,7 +18,7 @@
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
-@@ -240,7 +242,7 @@
+@@ -240,7 +244,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
@@ -18,3 +27,29 @@
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";
+@@ -344,6 +348,25 @@
+ exit(1);
+ }
+ /* XXX Need to freopen()? */
++
++ /*
++ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and
++ * above ?) won't complain about missing file descriptors.
++ */
++ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
++ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDOUT_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDERR_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ close(fd);
++
+ /* Always Deliver interactively (pause when child depth gets large) */
+ execl(sendmail, "sendmail", "-odi", watcher, NULL);
+ syslog(LOG_ERR, "execl: %s: %m", sendmail);
diff --git a/net-mgmt/arpwatch/Makefile b/net-mgmt/arpwatch/Makefile
index 50030469973..74f25956d9a 100644
--- a/net-mgmt/arpwatch/Makefile
+++ b/net-mgmt/arpwatch/Makefile
@@ -7,7 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/
diff --git a/net-mgmt/arpwatch/files/patch-ah b/net-mgmt/arpwatch/files/patch-ah
index 0dd2433a689..b292b25116d 100644
--- a/net-mgmt/arpwatch/files/patch-ah
+++ b/net-mgmt/arpwatch/files/patch-ah
@@ -1,6 +1,15 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
-+++ report.c Thu Feb 22 22:47:29 2001
-@@ -70,6 +70,8 @@
++++ report.c Thu May 16 11:34:33 2002
+@@ -45,6 +45,8 @@
+
+ #include <ctype.h>
+ #include <errno.h>
++#include <fcntl.h>
++#include <paths.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -70,6 +72,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
@@ -9,7 +18,7 @@
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
-@@ -240,7 +242,7 @@
+@@ -240,7 +244,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
@@ -18,3 +27,29 @@
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";
+@@ -344,6 +348,25 @@
+ exit(1);
+ }
+ /* XXX Need to freopen()? */
++
++ /*
++ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and
++ * above ?) won't complain about missing file descriptors.
++ */
++ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
++ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDOUT_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDERR_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ close(fd);
++
+ /* Always Deliver interactively (pause when child depth gets large) */
+ execl(sendmail, "sendmail", "-odi", watcher, NULL);
+ syslog(LOG_ERR, "execl: %s: %m", sendmail);
diff --git a/net/arpwatch-devel/Makefile b/net/arpwatch-devel/Makefile
index 50030469973..74f25956d9a 100644
--- a/net/arpwatch-devel/Makefile
+++ b/net/arpwatch-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/
diff --git a/net/arpwatch-devel/files/patch-ah b/net/arpwatch-devel/files/patch-ah
index 0dd2433a689..b292b25116d 100644
--- a/net/arpwatch-devel/files/patch-ah
+++ b/net/arpwatch-devel/files/patch-ah
@@ -1,6 +1,15 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
-+++ report.c Thu Feb 22 22:47:29 2001
-@@ -70,6 +70,8 @@
++++ report.c Thu May 16 11:34:33 2002
+@@ -45,6 +45,8 @@
+
+ #include <ctype.h>
+ #include <errno.h>
++#include <fcntl.h>
++#include <paths.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -70,6 +72,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
@@ -9,7 +18,7 @@
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
-@@ -240,7 +242,7 @@
+@@ -240,7 +244,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
@@ -18,3 +27,29 @@
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";
+@@ -344,6 +348,25 @@
+ exit(1);
+ }
+ /* XXX Need to freopen()? */
++
++ /*
++ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and
++ * above ?) won't complain about missing file descriptors.
++ */
++ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
++ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDOUT_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDERR_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ close(fd);
++
+ /* Always Deliver interactively (pause when child depth gets large) */
+ execl(sendmail, "sendmail", "-odi", watcher, NULL);
+ syslog(LOG_ERR, "execl: %s: %m", sendmail);
diff --git a/net/arpwatch/Makefile b/net/arpwatch/Makefile
index 50030469973..74f25956d9a 100644
--- a/net/arpwatch/Makefile
+++ b/net/arpwatch/Makefile
@@ -7,7 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/
diff --git a/net/arpwatch/files/patch-ah b/net/arpwatch/files/patch-ah
index 0dd2433a689..b292b25116d 100644
--- a/net/arpwatch/files/patch-ah
+++ b/net/arpwatch/files/patch-ah
@@ -1,6 +1,15 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
-+++ report.c Thu Feb 22 22:47:29 2001
-@@ -70,6 +70,8 @@
++++ report.c Thu May 16 11:34:33 2002
+@@ -45,6 +45,8 @@
+
+ #include <ctype.h>
+ #include <errno.h>
++#include <fcntl.h>
++#include <paths.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -70,6 +72,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
@@ -9,7 +18,7 @@
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
-@@ -240,7 +242,7 @@
+@@ -240,7 +244,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
@@ -18,3 +27,29 @@
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";
+@@ -344,6 +348,25 @@
+ exit(1);
+ }
+ /* XXX Need to freopen()? */
++
++ /*
++ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and
++ * above ?) won't complain about missing file descriptors.
++ */
++ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
++ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDOUT_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDERR_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ close(fd);
++
+ /* Always Deliver interactively (pause when child depth gets large) */
+ execl(sendmail, "sendmail", "-odi", watcher, NULL);
+ syslog(LOG_ERR, "execl: %s: %m", sendmail);