summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_main.c
diff options
context:
space:
mode:
authorVyacheslav Trushkin <me@dogonthesun.net>2011-12-20 17:52:31 +0100
committerDenis Ovsienko <infrastation@yandex.ru>2012-01-02 15:38:11 +0100
commit6fd16207fee6d4d09f29ed7ecf26303a7220e473 (patch)
treefbc4a0ad11f99c5b7547e1aea47dce536c14f64d /ospf6d/ospf6_main.c
parentospfd: fix bug in NSSA ABR status check (diff)
downloadfrr-6fd16207fee6d4d09f29ed7ecf26303a7220e473.tar.xz
frr-6fd16207fee6d4d09f29ed7ecf26303a7220e473.zip
ospf6d: add verifying user's privileges
Diffstat (limited to 'ospf6d/ospf6_main.c')
-rw-r--r--ospf6d/ospf6_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index c4b9124e3..d40bd97f3 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 ();