diff options
author | Vyacheslav Trushkin <me@dogonthesun.net> | 2011-12-20 20:52:31 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2012-01-02 17:28:01 +0400 |
commit | 13351032d1d1632dbaf540cf33b7bebbc748c415 (patch) | |
tree | afbef258221ec2d954b6bcf3f9cf1b70c73be054 /ospf6d | |
parent | 85136e904861775bdf6fbbbd4f0080f06e749bcb (diff) |
ospf6d: add verifying user's privileges
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 235a6858..8444d90f 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -262,6 +262,13 @@ main (int argc, char *argv[], char *envp[]) } } + if (geteuid () != 0) + { + errno = EPERM; + perror (progname); + exit (1); + } + /* thread master */ master = thread_master_create (); |