DEVFS - don't apply generic rules to jailed mountpoints
authorAlex Hornung <ahornung@gmail.com>
Thu, 13 Aug 2009 13:56:50 +0000 (14:56 +0100)
committerAlex Hornung <ahornung@gmail.com>
Mon, 17 Aug 2009 09:14:45 +0000 (10:14 +0100)
* Only apply rules intended for jails to jailed mountpoints, not
  any rule, as before.

sys/vfs/devfs/devfs_rules.c

index 587bc6d..ebbcd32 100644 (file)
@@ -232,6 +232,14 @@ devfs_rule_check_apply(struct devfs_node *node, void *unused)
                        continue;
 
                /*
+                * Skip this rule if it is not intended for jailed mount points
+                * and the current mount point is jailed.
+                */
+               if (!(rule->rule_type & DEVFS_RULE_JAIL) &&
+                       (DEVFS_MNTDATA(mp)->jailed))
+                   continue;
+
+               /*
                 * Skip this rule if the mount point specified in the rule doesn't
                 * match the mount point of the node
                 */