summaryrefslogtreecommitdiff
path: root/sbin/pflogd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-03 20:47:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-03 20:47:42 +0000
commitf1e456032facee63cf671bfe73b7c3d0eebced64 (patch)
tree7cd14d9862457b9a692f9996f039c3bd2e0aba7e /sbin/pflogd
parenta8a4d48ee1dfe73c5bcc706b5c609853ef3c845e (diff)
Get rid of pflogd.pid because the privsep child cannot delete the pidfile;
use pkill(1) in /etc/newsyslog.conf instead together with otto and suggestions from tedu
Diffstat (limited to 'sbin/pflogd')
-rw-r--r--sbin/pflogd/pflogd.814
-rw-r--r--sbin/pflogd/pflogd.c13
2 files changed, 6 insertions, 21 deletions
diff --git a/sbin/pflogd/pflogd.8 b/sbin/pflogd/pflogd.8
index 6eef1e6453c..f27818972a5 100644
--- a/sbin/pflogd/pflogd.8
+++ b/sbin/pflogd/pflogd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pflogd.8,v 1.37 2008/10/22 08:16:49 henning Exp $
+.\" $OpenBSD: pflogd.8,v 1.38 2009/11/03 20:47:41 deraadt Exp $
.\"
.\" Copyright (c) 2001 Can Erkin Acar. All rights reserved.
.\"
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 22 2008 $
+.Dd $Mdocdate: November 3 2009 $
.Dt PFLOGD 8
.Os
.Sh NAME
@@ -37,7 +37,6 @@
.Op Fl d Ar delay
.Op Fl f Ar filename
.Op Fl i Ar interface
-.Op Fl p Ar pidfile
.Op Fl s Ar snaplen
.Op Ar expression
.Ek
@@ -124,13 +123,6 @@ By default,
.Nm
will use
.Ar pflog0 .
-.It Fl p Ar pidfile
-Writes a file containing the process ID of the program to
-.Pa /var/run .
-The file name has the form
-.Ao Ar pidfile Ac Ns .pid .
-The default is
-.Ar pflogd .
.It Fl s Ar snaplen
Analyze at most the first
.Ar snaplen
@@ -146,8 +138,6 @@ Selects which packets will be dumped, using the regular language of
.El
.Sh FILES
.Bl -tag -width /var/run/pflogd.pid -compact
-.It Pa /var/run/pflogd.pid
-Process ID of the currently running
.Nm .
.It Pa /var/log/pflog
Default log file.
diff --git a/sbin/pflogd/pflogd.c b/sbin/pflogd/pflogd.c
index ae133cb8bb6..7906269d912 100644
--- a/sbin/pflogd/pflogd.c
+++ b/sbin/pflogd/pflogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pflogd.c,v 1.46 2008/10/22 08:16:49 henning Exp $ */
+/* $OpenBSD: pflogd.c,v 1.47 2009/11/03 20:47:41 deraadt Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -157,8 +157,8 @@ __dead void
usage(void)
{
fprintf(stderr, "usage: pflogd [-Dx] [-d delay] [-f filename]");
- fprintf(stderr, " [-i interface] [-p pidfile]\n");
- fprintf(stderr, " [-s snaplen] [expression]\n");
+ fprintf(stderr, " [-i interface] [-s snaplen]\n");
+ fprintf(stderr, " [expression]\n");
exit(1);
}
@@ -576,13 +576,12 @@ main(int argc, char **argv)
int ch, np, ret, Xflag = 0;
pcap_handler phandler = dump_packet;
const char *errstr = NULL;
- char *pidf = NULL;
ret = 0;
closefrom(STDERR_FILENO + 1);
- while ((ch = getopt(argc, argv, "Dxd:f:i:p:s:")) != -1) {
+ while ((ch = getopt(argc, argv, "Dxd:f:i:s:")) != -1) {
switch (ch) {
case 'D':
Debug = 1;
@@ -598,9 +597,6 @@ main(int argc, char **argv)
case 'i':
interface = optarg;
break;
- case 'p':
- pidf = optarg;
- break;
case 's':
snaplen = strtonum(optarg, 0, PFLOGD_MAXSNAPLEN,
&errstr);
@@ -636,7 +632,6 @@ main(int argc, char **argv)
logmsg(LOG_WARNING, "Failed to become daemon: %s",
strerror(errno));
}
- pidfile(pidf);
}
tzset();