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 - sudo -l failures when nsswitch.conf has invalid sudoers line
Summary: sudo -l failures when nsswitch.conf has invalid sudoers line
Keywords:
Status: CLOSED DUPLICATE of bug 1147498
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sudo
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Kopeček
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
: 1156542 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-22 21:12 UTC by Scott Poore
Modified: 2018-12-09 18:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-27 10:56:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.