summaryrefslogtreecommitdiff
path: root/sbin/pflogd/pflogd.c
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/pflogd.c
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/pflogd.c')
-rw-r--r--sbin/pflogd/pflogd.c13
1 files changed, 4 insertions, 9 deletions
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();