Description of problem: /lib/udev/vol_id goes stuck in a loop if founds a malformed line in /etc/passwd Version-Release number of selected component (if applicable): Red Hat Enterprise Linux 5.1 How reproducible: Always Steps to Reproduce: 1. put a "#" at the beginning of /etc/passwd 2. run /lib/udev/vol_id /dev/sda1 3. vol_id loops forever Actual results: vol_id hangs Expected results: vol_id should not hang and ignore the malformed line or report an error Additional info: the problem is in the get_id_field_by_name (in udev_libc_wrapper.c) that is expecting a ":" character and loops if it does not find it. The upstream version of udev is not affected from the problem as they do not use the custom "lookup_user" function but the libc function getpwnam. I am attaching a patch with a backport from udev 106-04 that fix the problem but there may be other udev code apart vol_id that use "lookup_user" function.
Created attachment 289762 [details] patch for vol_id that fix the problem
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Created attachment 291702 [details] patch for the source of the loop Here is another patch, which should fix the source of the problem. lookup_user is used in several other functions.
Please try: http://people.redhat.com/harald/downloads/udev/udev-095-14.12.el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0374.html