diff --git a/linux_os/guide/system/accounts/accounts-session/accounts_users_home_files_permissions/oval/shared.xml b/linux_os/guide/system/accounts/accounts-session/accounts_users_home_files_permissions/oval/shared.xml index 94bf720a340..f95ab09f377 100644 --- a/linux_os/guide/system/accounts/accounts-session/accounts_users_home_files_permissions/oval/shared.xml +++ b/linux_os/guide/system/accounts/accounts-session/accounts_users_home_files_permissions/oval/shared.xml @@ -24,11 +24,15 @@ + + symbolic link + ^[^\.].* + state_accounts_users_home_files_permissions_is_symlink diff --git a/shared/macros/10-bash.jinja b/shared/macros/10-bash.jinja index 883f8929ddf..d9ad023124a 100644 --- a/shared/macros/10-bash.jinja +++ b/shared/macros/10-bash.jinja @@ -1432,9 +1432,9 @@ for home_dir in $(awk -F':' '{ if ($3 >= {{{ uid_min }}} && $3 != {{{ nobody_uid # the permission is already defined as expected, therefore not impacting in possible integrity # check systems that also check inodes timestamps. {{%- if recursive %}} - find "$home_dir" -perm /7027 -exec chmod u-s,g-w-s,o=- {} \; + find "$home_dir" -perm /7027 \! -type l -exec chmod u-s,g-w-s,o=- {} \; {{%- else %}} - find "$home_dir" -maxdepth 0 -perm /7027 -exec chmod u-s,g-w-s,o=- {} \; + find "$home_dir" -maxdepth 0 -perm /7027 \! -type l -exec chmod u-s,g-w-s,o=- {} \; {{%- endif %}} done {{%- endmacro -%}}