Hide Forgot
Created attachment 559672 [details] patch to avoid skiping entries +++ This bug was initially created as a clone of Red HatBug #787736 +++ Created attachment 559668 [details] patch to avoid skiping entries Description of problem: If /etc/shadow (or /etc/gshadow) contains consecutive bad lines pwconv only fixes the first, skipping the 2nd. Version-Release number of selected component (if applicable): shadow-utils-4.1.4.2-13.el6 How reproducible: Always. Steps to Reproduce: echo 'example1:!!:15372:0:99999:7:::' >> /etc/shadow echo 'example2:!!:15372:0:99999:7:::' >> /etc/shadow pwck -r pwconv pwck -r Actual results: # echo 'example1:!!:15372:0:99999:7:::' >> /etc/shadow # echo 'example2:!!:15372:0:99999:7:::' >> /etc/shadow # pwck -r no matching password file entry in /etc/passwd delete line 'example1:!!:15372:0:99999:7:::'? No no matching password file entry in /etc/passwd delete line 'example2:!!:15372:0:99999:7:::'? No pwck: no changes # pwconv # pwck -r no matching password file entry in /etc/passwd delete line 'example2:!!:15372:0:99999:7:::'? No pwck: no changes Expected results: # echo 'example1:!!:15372:0:99999:7:::' >> /etc/shadow # echo 'example2:!!:15372:0:99999:7:::' >> /etc/shadow # pwck -r no matching password file entry in /etc/passwd delete line 'example1:!!:15372:0:99999:7:::'? No no matching password file entry in /etc/passwd delete line 'example2:!!:15372:0:99999:7:::'? No pwck: no changes # pwconv # pwck -r pwck: no changes Additional info: Problem is due to structure of layer fetch routines. pwconv does a loop via spw_next() and when it finds an error deletes the entry by name. Unfortunately the delete routine checks whether a deleted item corresponds to the current fetch item and if so does an internal next, then the main loop runs and this subsequent entry is skipped.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1522.html