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

Relax Check in GECOS Field: Allow any Data except Colons [SLE-15-SP6] #395

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

shundhammer
Copy link
Contributor

@shundhammer shundhammer commented Aug 20, 2024

Target Branch

This is for SLE-15-SP6. The merge to master / Factory is #398.

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1228149

Trello

https://trello.com/c/PLxx2iDV

Problem

PAM in connection with some desktops like GNOME need an umask specification to be set in the GECOS field (the comment / full user name field) in /etc/passwd.

But the YaST users module complains that only 3 fields separated by commas are permitted:

y-users-gecos-error

This is triggered when trying to leave that tab.

Cause

There is an additional check in the ancient Users.pm Perl module that dates back to 2004. Why this check exists is unclear; there doesn't seem to be a reference why this limitation was introduced.

Fix

Removed that check.

Test

Manual test in a TW VM. After removing this check, it doesn't complain anymore, and /etc/password now contains the expected entry:

% grep '^kilroy' /etc/passwd

kilroy:x:1001:100:Kilroy Anon,,,,UMASK=022:/home/kilroy:/bin/bash

Further Reading

  • man 1 chfn
  • man 8 pam_umask

Related PR

@shundhammer shundhammer changed the base branch from master to SLE-15-SP6 August 20, 2024 13:21
@mvidner
Copy link
Member

mvidner commented Aug 21, 2024

Archaeology time! :)
The check was added in commit 511d3d0 in 2003, in response bug suse18270 which is https://bugzilla.suse.com/show_bug.cgi?id=33270
At that time, the passwd(5) man page probably contained some details about GECOS, but there was no specific bug.
Funnily, even then we knew about umask=.

@shundhammer
Copy link
Contributor Author

See also #396

@shundhammer shundhammer force-pushed the huha-gecos-SLE-15-SP6 branch from 1b71fb0 to 2b07a73 Compare August 21, 2024 13:22
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10490803088

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 60.799%

Totals Coverage Status
Change from base Build 10490731895: 0.0%
Covered Lines: 3395
Relevant Lines: 5584

💛 - Coveralls

@shundhammer shundhammer merged commit 24975ad into SLE-15-SP6 Aug 21, 2024
12 checks passed
@shundhammer shundhammer deleted the huha-gecos-SLE-15-SP6 branch August 21, 2024 13:28
@yast-bot
Copy link
Contributor

❌ Internal Jenkins job #5 failed

@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #6 successfully finished

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.

5 participants