From: Vyacheslav Trushkin Date: Tue, 20 Dec 2011 16:52:31 +0000 (+0400) Subject: ospf6d: add verifying user's privileges X-Git-Tag: frr-2.0-rc1~1939 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6fd16207fee6d4d09f29ed7ecf26303a7220e473;p=matthieu%2Ffrr.git ospf6d: add verifying user's privileges --- diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index c4b9124e3f..d40bd97f30 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -291,6 +291,13 @@ main (int argc, char *argv[], char *envp[]) } } + if (geteuid () != 0) + { + errno = EPERM; + perror (progname); + exit (1); + } + /* thread master */ master = thread_master_create ();