gateway: fix policy script permissions checking
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 7 Jan 2013 08:48:56 +0000 (09:48 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 7 Jan 2013 08:49:10 +0000 (09:49 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/cfgparser/olsrd_conf.c

index 5272ba8..a34c117 100644 (file)
@@ -588,7 +588,7 @@ olsrd_sanity_check_cnf(struct olsrd_config *cnf)
         return -1;
       }
 
-      if (statbuf.st_mode & S_IXUSR) {
+      if (!(statbuf.st_mode & (S_IRUSR | S_IXUSR))) {
         fprintf(stderr, "Error, policy routing script is not executable\n");
         return -1;
       }