pam-auth-update spews Perl warnings while processing a valid profile file

Bug #364665 reported by Daniel Richard G. on 2009-04-21
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pam (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: libpam-runtime

This bug report is an offshoot of bug #295441. pam-auth-update (from libpam-runtime 1.0.1-4ubuntu5.5 in Intrepid) no longer generates an invalid PAM config file, but it is still producing copious Perl warnings while processing the attached (well-formed) authentication profile file:

# /usr/sbin/pam-auth-update
 Use of uninitialized value $3 in split at /usr/sbin/pam-auth-update line 607, <CURRENT> line 27.
 Use of uninitialized value $curmod in quotemeta at /usr/sbin/pam-auth-update line 615, <CURRENT> line 27.
 Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 637, <CURRENT> line 27.
 Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 637, <CURRENT> line 27.
...

Steve Langasek (vorlon) wrote :

Is this problem still reproducible for you with pam-auth-update in a currently supported version of Ubuntu? If so, can you please attach a tarball of /usr/share/pam-configs and /var/lib/pam?

Changed in pam (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for pam (Ubuntu) because there has been no activity for 60 days.]

Changed in pam (Ubuntu):
status: Incomplete → Expired
Daniel Richard G. (skunk) wrote :

This bug appears to have gone away---I can no longer get any Perl warnings out of pam-auth-update in Natty with the PAM config from bug 295441.

Changed in pam (Ubuntu):
status: Expired → Invalid
John Brooker (john-brooker) wrote :

This bug appears to be present in lucid 10.04 (libpam-runtime 1.1.1-2ubuntu5.4 ):

# pam-auth-update --package
Use of uninitialized value $3 in split at /usr/sbin/pam-auth-update line 624, <CURRENT> line 25.
Use of uninitialized value $curmod in quotemeta at /usr/sbin/pam-auth-update line 632, <CURRENT> line 25.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 654, <CURRENT> line 25.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 654, <CURRENT> line 25.
Use of uninitialized value $3 in split at /usr/sbin/pam-auth-update line 624, <CURRENT> line 25.
Use of uninitialized value $curmod in quotemeta at /usr/sbin/pam-auth-update line 632, <CURRENT> line 25.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 654, <CURRENT> line 25.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 654, <CURRENT> line 25.

The regex and variable assignments appear to assume that there will always be an argument to a particular pam module, which is logically incorrect:
623 $line =~ /^((\[[^]]+\]|\w+)\s+\S+)\s*(.*)/;
624 @prev_opts = split(/\s+/,$3);

Qaxi (qaxi) wrote :

wow ... the bug still exists ...
$ sudo pam-auth-update
Use of uninitialized value $3 in split at /usr/sbin/pam-auth-update line 623, <CURRENT> line 18.
Use of uninitialized value $curmod in quotemeta at /usr/sbin/pam-auth-update line 631, <CURRENT> line 18.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 18.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 18.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 18.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 18.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 18.
Use of uninitialized value $3 in split at /usr/sbin/pam-auth-update line 623, <CURRENT> line 30.
Use of uninitialized value $curmod in quotemeta at /usr/sbin/pam-auth-update line 631, <CURRENT> line 30.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 30.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 30.
Use of uninitialized value $3 in split at /usr/sbin/pam-auth-update line 623, <CURRENT> line 30.
Use of uninitialized value $curmod in quotemeta at /usr/sbin/pam-auth-update line 631, <CURRENT> line 30.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 30.
Use of uninitialized value $curmod in hash element at /usr/sbin/pam-auth-update line 653, <CURRENT> line 30.

I am attaching my pam files added to /usr/share/pam-configs

Qaxi (qaxi) wrote :

and the othe file in /usr/share/pam-configs

On Thu, Dec 05, 2013 at 10:26:00AM -0000, Qaxi wrote:
> wow ... the bug still exists ...

Please file a new bug report for the problem you're seeing, instead of
following up to one that the original submitter said was no longer
reproducible.

And as requested in comment #1, please attach the complete contents of your
/usr/share/pam-configs and /var/lib/pam directories.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers