From: Florian Forster Date: Wed, 12 Jul 2006 06:50:23 +0000 (+0200) Subject: oping: Drop root privileges as soon as possible. X-Git-Tag: liboping-0.3.2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=14758e6a1af542d7f6a25e6fa9831bd07eac8428;p=liboping.git oping: Drop root privileges as soon as possible. --- 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;