<def-group>
  <definition class="compliance" id="file_permissions_backup_etc_gshadow" version="1">
  
    <metadata>
        <title>Verify Permissions on Backup gshadow File</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>This test makes sure that /etc/gshadow- has mode 0640.
      If the target file or directory has an extended ACL, then it will fail the mode check.
      </description>
    </metadata>
    <criteria>
  
      <criterion comment="Check file mode of /etc/gshadow-" test_ref="test_file_permissions_backup_etc_gshadow_0"/>
  
  
    </criteria>
  </definition>

  
  <unix:file_test check="all" check_existence="none_exist" comment="Testing mode of /etc/gshadow-" id="test_file_permissions_backup_etc_gshadow_0" version="3">
    <unix:object object_ref="object_file_permissions_backup_etc_gshadow_0" />
  </unix:file_test>

  <unix:file_object comment="/etc/gshadow-" id="object_file_permissions_backup_etc_gshadow_0" version="1">
      <unix:filepath>/etc/gshadow-</unix:filepath>
      <filter action="exclude">exclude_symlinks__backup_etc_gshadow</filter>
      <filter action="exclude">state_file_permissions_backup_etc_gshadow_0_mode_0640or_stricter_</filter>
  </unix:file_object>

  <unix:file_state id="state_file_permissions_backup_etc_gshadow_0_mode_0640or_stricter_" operator="AND" version="3">
      <unix:suid datatype="boolean">false</unix:suid>
      <unix:sgid datatype="boolean">false</unix:sgid>
      <unix:sticky datatype="boolean">false</unix:sticky>
      <unix:uexec datatype="boolean">false</unix:uexec>
      <unix:gwrite datatype="boolean">false</unix:gwrite>
      <unix:gexec datatype="boolean">false</unix:gexec>
      <unix:oread datatype="boolean">false</unix:oread>
      <unix:owrite datatype="boolean">false</unix:owrite>
      <unix:oexec datatype="boolean">false</unix:oexec>
  </unix:file_state>
  

  <unix:file_state id="exclude_symlinks__backup_etc_gshadow" version="1">
    <unix:type operation="equals">symbolic link</unix:type>
  </unix:file_state>
</def-group>