Skip to content
Snippets Groups Projects
  • Nick Kralevich's avatar
    48212742
    Don't allow types which are both file_type and fs_type · 48212742
    Nick Kralevich authored
    It's a bug to have a type with both the file_type and fs_type
    attribute. A type should be declared with either file_type,
    or fs_type, but not both.
    
    Create a neverallow rule which detects this situation. This works
    because we have the following allow rule:
    
      allow fs_type self:filesystem associate;
    
    If a type is a file_type and an fs_type, the associate allow rule
    will conflict with this neverallow rule.
    
    Not sure if this is the cleanest way to accomplish this, but it
    seems to work.
    
    Change-Id: Ida387b1df260efca15de38ae7a66ed25e353acaa
    48212742
    History
    Don't allow types which are both file_type and fs_type
    Nick Kralevich authored
    It's a bug to have a type with both the file_type and fs_type
    attribute. A type should be declared with either file_type,
    or fs_type, but not both.
    
    Create a neverallow rule which detects this situation. This works
    because we have the following allow rule:
    
      allow fs_type self:filesystem associate;
    
    If a type is a file_type and an fs_type, the associate allow rule
    will conflict with this neverallow rule.
    
    Not sure if this is the cleanest way to accomplish this, but it
    seems to work.
    
    Change-Id: Ida387b1df260efca15de38ae7a66ed25e353acaa