Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1133140

Summary: sudo -l failures when nsswitch.conf has invalid sudoers line
Product: Red Hat Enterprise Linux 6 Reporter: Scott Poore <spoore>
Component: sudoAssignee: Daniel Kopeček <dkopecek>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: dspurek, pkis, pvrabec, sgadekar
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-27 10:56:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Poore 2014-08-22 21:12:12 UTC
Description of problem:

If I have invalid sudoers line in nsswitch.conf, I see failures that aren't very descriptive when I run "sudo -l".

Scenario 1:

sudoers: files sss: sudoers: files sss

[root@ibm-x3250m4-02 ~]# sudo -l
Segmentation fault (core dumped)

Scenario 2:

sudoers: files sss: sudoers: files

[root@ibm-x3250m4-02 ~]# vi /etc/nsswitch.conf
[root@ibm-x3250m4-02 ~]# sudo -l
sudo: >>> /etc/sudoers: /etc/sudoers.d: Too many open files near line 117 <<<
sudo: parse error in /etc/sudoers near line 117
sudo: unable to open /etc/sudoers: Too many open files
sudo: unable to open /etc/sudoers: Too many open files
sudo: unable to open /etc/sudoers: Too many open files
sudo: unable to open /etc/sudoers: Too many open files

... seems to continue indefinitely.

Version-Release number of selected component (if applicable):
sudo-1.8.6p3-15.el6.x86_64

How reproducible:
very

Steps to Reproduce:
1.  echo "sudoers: files sss: sudoers: files sss" >> /etc/nsswitch.conf
2.  sudo -l
3.  sed -i '/sudoers/d' /etc/nsswitch.conf
4.  echo "sudoers: files sss: sudoers: files" >> /etc/nsswitch.conf
5.  sudo -l
6.  in another window killall -9 sudo

Actual results:
2. core dump 
5. infinite loop showing error.

Expected results:
Better error messages and no infinite loop.

Additional info:

Comment 2 Daniel Kopeček 2015-02-24 12:44:32 UTC
*** Bug 1156542 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Kopeček 2015-02-27 10:56:01 UTC

*** This bug has been marked as a duplicate of bug 1147498 ***