Skip to content

Commit d067187

Browse files
authored
Merge pull request #15031 from Mab879/backport_15018
Stabilization: Adjust file rules to not follow symlinks
2 parents cc4d4fe + 92b1f96 commit d067187

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

  • linux_os/guide/system/accounts/accounts-session

linux_os/guide/system/accounts/accounts-session/accounts_users_home_files_groupownership/ansible/shared.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
path: '{{ item.0.value[4] }}'
3232
group: '{{ item.0.value[2] }}'
3333
recurse: yes
34+
follow: false
3435
loop: '{{ local_users|zip(path_exists.results)|list }}'
3536
when:
3637
- item.1.stat is defined and item.1.stat.exists

linux_os/guide/system/accounts/accounts-session/accounts_users_home_files_ownership/ansible/shared.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
path: '{{ item.0.value[4] }}'
3232
owner: '{{ item.0.value[1] }}'
3333
recurse: yes
34+
follow: false
3435
loop: '{{ local_users|zip(path_exists.results)|list }}'
3536
when:
3637
- item.1.stat is defined and item.1.stat.exists

linux_os/guide/system/accounts/accounts-session/accounts_users_netrc_file_permissions/ansible/shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929
state: file
3030
loop: '{{ path_exists.results }}'
3131
when:
32-
- item.stat is defined and item.stat.exists
32+
- item.stat is defined and item.stat.exists and not item.stat.islnk

linux_os/guide/system/accounts/accounts-session/accounts_users_netrc_file_permissions/bash/shared.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
for user in $(awk -F':' '{ if ($3 >= {{{ uid_min }}} && $3 != {{{ nobody_uid }}}) print $1 }' /etc/passwd); do
88
home_dir=$(getent passwd "$user" | cut -d: -f6)
9-
find "${home_dir}/.netrc" -exec chmod 0600 {} \;
9+
find "${home_dir}/.netrc" -type f -exec chmod 0600 {} \;
1010
done

0 commit comments

Comments
 (0)