Skip to content

Commit

Permalink
Stop requiring the directory
Browse files Browse the repository at this point in the history
We will not require the parent directory to exist, the OVAL test will
pass also if the directory doesn't exist.  It isn't mandatory to create
the parent directory because when the directory doesn't exist, it gets
created automatically by pam. However, if the parent directory exists,
it must have correct mode, otherwise the polyinstantiation will fail.
  • Loading branch information
jan-cerny committed Mar 7, 2024
1 parent dca0041 commit 13d2d86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = multi_platform_fedora,Red Hat Enterprise Linux 7,Red Hat Enterprise Linux 8,multi_platform_sle
# platform = multi_platform_fedora,multi_platform_rhel,multi_platform_sle
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<definition class="compliance" id="accounts_polyinstantiated_tmp" version="1">
{{{ oval_metadata("") }}}
<criteria operator="AND" comment="Check Polyinstantiation of /tmp Directories">
<criterion comment="Check that /tmp/tmp-inst exists and has mode 000" test_ref="test_tmp_inst" />
<criterion comment="Check that if /tmp/tmp-inst exists it has mode 000" test_ref="test_tmp_inst" />
<criterion comment="Check configuration of /tmp in /etc/security/namespace.conf file" test_ref="test_tmp_in_namespace_conf" />
</criteria>
</definition>

<unix:file_test comment="Check that /tmp/tmp-inst exists and has mode 000" check="all" check_existence="only_one_exists" id="test_tmp_inst" version="1">
<unix:file_test comment="Check that /tmp/tmp-inst doesn't exist or it exists and has mode 000" check="all" check_existence="any_exist" id="test_tmp_inst" version="1">
<unix:object object_ref="obj_tmp_inst" />
<unix:state state_ref="state_tmp_inst" />
</unix:file_test>
Expand Down

0 comments on commit 13d2d86

Please sign in to comment.