#984835 /usr/sbin/pam-auth-update: allow comments in pam-config files

Package:
libpam-runtime
Source:
pam
Submitter:
Martin Schurz
Date:
2023-08-13 18:03:04 UTC
Severity:
wishlist
Tags:
#984835#5
Date:
2021-03-08 21:33:53 UTC
From:
To:
Dear Maintainer,

we are shipping some custom pam-configs with our automation, for clarity
we want to include comments in these files. Currently this is not
supported and leeds to perl warning messages because of failed file
parsing. This is just an anoyance, the script is working correctly, even
with comments in files. I just want to get rid of the warning messages.

Output from pam-auth-update with comments im pam-config:
# pam-auth-update --package
Use of uninitialized value $fieldname in hash element at /usr/sbin/pam-auth-update line 704, <PROFILE> line 1.
Use of uninitialized value $fieldname in hash element at /usr/sbin/pam-auth-update line 705, <PROFILE> line 1.

I attached a patch, that enables comments with a "#" mark. If also
honors indented comments, so one could add descriptive comments in the
PAM configuration, without these comments being transfered to the
resulting PAM configuration.

The comment sign and support for indented comments is for you to decide.