commit | 13351032d1d1632dbaf540cf33b7bebbc748c415 | [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 17:28:01 2012 +0400 |
tree | afbef258221ec2d954b6bcf3f9cf1b70c73be054 | |
parent | 85136e904861775bdf6fbbbd4f0080f06e749bcb [diff] [blame] |
ospf6d: add verifying user's privileges
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 235a685..8444d90 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c
@@ -262,6 +262,13 @@ } } + if (geteuid () != 0) + { + errno = EPERM; + perror (progname); + exit (1); + } + /* thread master */ master = thread_master_create ();