commit | 6fd16207fee6d4d09f29ed7ecf26303a7220e473 | [log] [tgz] |
---|---|---|
author | Vyacheslav Trushkin <me@dogonthesun.net> | Tue Dec 20 20:52:31 2011 +0400 |
committer | Denis Ovsienko <infrastation@yandex.ru> | Mon Jan 02 18:38:11 2012 +0400 |
tree | fbc4a0ad11f99c5b7547e1aea47dce536c14f64d | |
parent | 4e677f52db2276b92bcc201b4379a66a83d45caa [diff] |
ospf6d: add verifying user's privileges
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index c4b9124..d40bd97 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c
@@ -291,6 +291,13 @@ } } + if (geteuid () != 0) + { + errno = EPERM; + perror (progname); + exit (1); + } + /* thread master */ master = thread_master_create ();