Skip to content

Commit

Permalink
Update no_forward_files to use OVAL macro
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusburghardt committed Feb 16, 2023
1 parent 083f30c commit dec8988
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
</criteria>
</definition>

<unix:password_object id="object_accounts_users_home_forward_file_existance_objects" version="1">
<unix:username datatype="string" operation="pattern match">.*</unix:username>
<filter action="include">state_accounts_users_home_forward_file_existance_interactive_gids</filter>
</unix:password_object>

<unix:password_state id="state_accounts_users_home_forward_file_existance_interactive_gids" version="1">
<unix:user_id datatype="int" operation="greater than or equal">{{{ gid_min }}}</unix:user_id>
</unix:password_state>
{{%- set interactive_users_object = "object_" ~ rule_id ~ "_objects" -%}}
{{{ create_interactive_users_list_object(interactive_users_object) }}}

<local_variable id="var_accounts_users_home_forward_file_existance_dirs" datatype="string" version="1"
comment="Variable including all home dirs from interactive users">
<object_component item_field="home_dir"
object_ref="object_accounts_users_home_forward_file_existance_objects"/>
object_ref="{{{ interactive_users_object }}}"/>
</local_variable>

<unix:file_object id="object_accounts_users_home_forward_file_existance" version="1">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
# remediation = none

USER="cac_user"
useradd -m -s /sbin/nologin $USER
touch /home/$USER/.forward

0 comments on commit dec8988

Please sign in to comment.