From 217442ffc72bdb98e1eb9723193fa8e66a65d280 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 14 Apr 2004 09:14:20 +0000 Subject: Don't forget to move to STATE_RUN if the -w output file is stdout. ok canacar@ --- usr.sbin/tcpdump/privsep_pcap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin/tcpdump/privsep_pcap.c') diff --git a/usr.sbin/tcpdump/privsep_pcap.c b/usr.sbin/tcpdump/privsep_pcap.c index e4edb473b40..18747bcc776 100644 --- a/usr.sbin/tcpdump/privsep_pcap.c +++ b/usr.sbin/tcpdump/privsep_pcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep_pcap.c,v 1.3 2004/04/08 12:38:00 avsm Exp $ */ +/* $OpenBSD: privsep_pcap.c,v 1.4 2004/04/14 09:14:19 otto Exp $ */ /* * Copyright (c) 2004 Can Erkin Acar @@ -483,9 +483,10 @@ priv_pcap_dump_open(pcap_t *p, char *fname) if (priv_fd < 0) errx(1, "%s: called from privileged portion\n", __func__); - if (fname[0] == '-' && fname[1] == '\0') + if (fname[0] == '-' && fname[1] == '\0') { f = stdout; - else { + priv_init_done(); + } else { write_command(priv_fd, PRIV_OPEN_OUTPUT); fd = receive_fd(priv_fd); must_read(priv_fd, &err, sizeof(err)); -- cgit v1.2.3