]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: add verifying user's privileges
authorVyacheslav Trushkin <me@dogonthesun.net>
Tue, 20 Dec 2011 16:52:31 +0000 (20:52 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 2 Jan 2012 13:28:01 +0000 (17:28 +0400)
ospf6d/ospf6_main.c

index 235a6858d8d573b77f7d0042678cbc3693168c64..8444d90f6c20352af0689d28e3497d865a018521 100644 (file)
@@ -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 ();