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.
Cause:
Bug in the sudoers source (nsswitch.conf) processing.
Consequence:
Sudo runs indefinitely when a sudoers source is mentioned more than once.
Fix:
Fixed the sudoers source processing code to handle duplicate entries.
Result:
Sudo process doesn't hang when duplicate sudoers source entries are present in nsswitch.conf
+++ This bug was initially created as a clone of Bug #1133657 +++
Description of problem:
As a result of ipa-client-install bug[1] my machine had the following nsswitch entry:
# grep sudo /etc/nsswitch.conf
sudoers: files sss sss
This broke sudo completely, the sudo binary never finishes.
Version-Release number of selected component (if applicable):
sudo-1.8.8-7.fc21.x86_64
How reproducible:
easy peasy
Steps to Reproduce:
1. put "sudoers: files sss sss" into nsswitch.conf
2. sudo ls
3.
Actual results:
sudo hangs
Expected results:
sudo runs to completion
Additional info:
[1] https://fedorahosted.org/freeipa/ticket/4508
This is the backtrace I'm seeing:
(gdb) bt
#0 0x00007f7f234cc21a in __libc_waitpid (pid=pid@entry=21813, stat_loc=stat_loc@entry=0x7fffbc70f64c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x00007f7f1c38944a in send_mail (fmt=fmt@entry=0x7f7f1c3b78a0 "%s") at ./logging.c:597
#2 0x00007f7f1c389e6c in vlog_warning (flags=flags@entry=8, fmt=fmt@entry=0x7f7f1c3b919e "problem with defaults entries", ap=ap@entry=0x7fffbc70faf0) at ./logging.c:467
#3 0x00007f7f1c38a7ad in log_warning (flags=flags@entry=8, fmt=fmt@entry=0x7f7f1c3b919e "problem with defaults entries") at ./logging.c:513
#4 0x00007f7f1c391c3b in sudoers_policy_init (info=info@entry=0x7fffbc70fc80, envp=envp@entry=0x7fffbc70ff08) at ./sudoers.c:158
#5 0x00007f7f1c38d4ed in sudoers_policy_open (version=65540, conversation=0x7f7f24249e30 <sudo_conversation>, plugin_printf=0x7f7f2425cde0 <_sudo_printf>, settings=0x7f7f24c8e080,
user_info=0x7f7f24c8c110, envp=0x7fffbc70ff08, args=0x0) at ./policy.c:547
#6 0x00007f7f242485f4 in policy_open (plugin=<optimized out>, plugin=<optimized out>, user_env=<optimized out>, user_info=<optimized out>, settings=<optimized out>) at ./sudo.c:1100
#7 main (argc=3, argv=0x7f7f24c8e080, envp=0x7fffbc70ff08) at ./sudo.c:206
(gdb) quit
--- Additional comment from Daniel Kopeček on 2014-09-15 08:18:20 EDT ---
Confirmed and reported upstream.
--- Additional comment from Daniel Kopeček on 2014-09-15 08:22:53 EDT ---
Proposed patch for the most recent upstream version. I'll fix this in Fedora as soon as upstream accepts the patch or pushes a better fix.
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.
https://rhn.redhat.com/errata/RHSA-2015-1409.html