Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use stat.pw_name, stat.gr_name instead of owner, group #377

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

richm
Copy link
Contributor

@richm richm commented Aug 17, 2023

Cause: The fields stat.owner and stat.group do not exist.

Consequence: The crypttab was always being set to owner/group root.

Fix: Use the correct fields stat.pw_name and stat.gr_name.

Result: Owner and group of crypttab are preserved.

See https://docs.ansible.com/ansible/2.9/modules/stat_module.html#return-stat/gr_name

Signed-off-by: Rich Megginson [email protected]

Cause: The fields `stat.owner` and `stat.group` do not exist.

Consequence: The crypttab was always being set to owner/group root.

Fix: Use the correct fields `stat.pw_name` and `stat.gr_name`.

Result: Owner and group of crypttab are preserved.

See https://docs.ansible.com/ansible/2.9/modules/stat_module.html#return-stat/gr_name

Signed-off-by: Rich Megginson <[email protected]>
@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage has no change and project coverage change: -1.68% ⚠️

Comparison is base (12915cb) 13.67% compared to head (ef7778e) 12.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #377      +/-   ##
==========================================
- Coverage   13.67%   12.00%   -1.68%     
==========================================
  Files           8        8              
  Lines        1733     1733              
  Branches       79        0      -79     
==========================================
- Hits          237      208      -29     
- Misses       1496     1525      +29     
Flag Coverage Δ
sanity ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@richm richm merged commit 6bbbca7 into linux-system-roles:main Aug 17, 2023
18 of 19 checks passed
@richm richm deleted the fix-stat-field-usage branch August 17, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant