From 14758e6a1af542d7f6a25e6fa9831bd07eac8428 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 12 Jul 2006 08:50:23 +0200 Subject: [PATCH] oping: Drop root privileges as soon as possible. --- src/oping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/oping.c b/src/oping.c index d4469a8..3201e85 100644 --- a/src/oping.c +++ b/src/oping.c @@ -322,6 +322,9 @@ int main (int argc, char **argv) } } + /* Drop root privileges if we're setuid-root. */ + setuid (getuid ()); + i = 0; for (iter = ping_iterator_get (ping); iter != NULL; -- 2.30.2