Comment 4 for bug 364665

Revision history for this message
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);