pam-auth-update should allow for comments in pam-configs profiles
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pam (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello Ubuntu PAM maintainers. I've noticed that while not fatal, there are profile parsing errors when pam-auth-update encounters typical comment lines as it attempts to treat each new line that isn't part of another field as a $fieldname like so:
Use of uninitialized value $fieldname in hash element at /usr/sbin/
Use of uninitialized value $fieldname in hash element at /usr/sbin/
Use of uninitialized value $fieldname in hash element at /usr/sbin/
You can reproduce this by placing a `#` on a new line of the profile.
This is important to me because I have to do some unclean or less than ideal trickery described in 2075389, and I want to be able to explain my reasoning for doing so within the profile for the next person who comes across it.
Even if it were not the case due to that bug, I'd still like to be able to place descriptive comments into our custom profile as the whole PAMConfigFramework is not exhaustively documented and was not very approachable to a new profile author without a lot of investigation.
Thanks!
Ubuntu releases tested: 20.04, 22.04, 24.04
Package versions are: libpam-runtime 1.3.1-5ubuntu4.7 (20.04), 1.4.0-11ubuntu2.4 (22.04), 1.5.3-5ubuntu5.1 (24.04)
Expectation: pam-auth-update discards any comment-like content (especially `^#`, but perhaps also `^;` and `^//`.
Instead: Parsing errors