projects
/
liboping.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb24d9a
)
oping: Drop root privileges as soon as possible.
author
Florian Forster
<octo@verplant.org>
Wed, 12 Jul 2006 06:50:23 +0000
(08:50 +0200)
committer
Florian Forster
<octo@verplant.org>
Wed, 12 Jul 2006 06:50:23 +0000
(08:50 +0200)
src/oping.c
patch
|
blob
|
history
diff --git
a/src/oping.c
b/src/oping.c
index
d4469a8
..
3201e85
100644
(file)
--- 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;