summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-12-10 19:05:22 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-12-10 19:05:22 +0000
commitefe9bf7d000060216c14825637f799acf5fc8784 (patch)
tree0c144d05fb179ad516fdf5da869d2f2b40b7df0b /usr.sbin
parent5c6f628b08f54b8e719b68ac0717b6568d7fa4b9 (diff)
for correctness, do seteuid, too. okay deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/tcpdump/tcpdump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c
index e620922dace..aa18d682f52 100644
--- a/usr.sbin/tcpdump/tcpdump.c
+++ b/usr.sbin/tcpdump/tcpdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdump.c,v 1.19 2000/10/03 14:21:57 ho Exp $ */
+/* $OpenBSD: tcpdump.c,v 1.20 2000/12/10 19:05:21 provos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -26,7 +26,7 @@ static const char copyright[] =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.19 2000/10/03 14:21:57 ho Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.20 2000/12/10 19:05:21 provos Exp $ (LBL)";
#endif
/*
@@ -298,6 +298,7 @@ main(int argc, char **argv)
* Also, this prevents the user from reading anyone's
* trace file.
*/
+ seteuid(getuid());
setuid(getuid());
pd = pcap_open_offline(RFileName, ebuf);
@@ -330,6 +331,7 @@ main(int argc, char **argv)
/*
* Let user own process after socket has been opened.
*/
+ seteuid(getuid());
setuid(getuid());
}
if (infile)