Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 841070

Summary: sudo 1.7.2p1-14.el5_8 removed sudoers line from nsswitch.conf
Product: Red Hat Enterprise Linux 5 Reporter: Ali Alzabarah <alihamad>
Component: sudoAssignee: Daniel Kopeček <dkopecek>
Status: CLOSED ERRATA QA Contact: Zbysek MRAZ <zmraz>
Severity: high Docs Contact:
Priority: high    
Version: 5.8CC: dapospis, dkopecek, ebenes, jpallich, ksrot, mvadkert, pvrabec
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: sudo-1.7.2p1-16.el5 Doc Type: Bug Fix
Doc Text:
Updating the sudo package resulted in the "sudoers" line in "/etc/nsswitch.conf" being removed. This update corrects the bug in the sudo package's post-uninstall script that caused this issue.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 07:49:55 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:
Bug Depends On:    
Bug Blocks: 844420    
Attachments:
Description Flags
proposed patch
none
proposed and tested patch none

Description Ali Alzabarah 2012-07-18 03:57:54 UTC
Description of problem:

we have our servers sudoers in ldap server. It worked perfectly until we updated  sudo to 1.7.2p1-14.el5_8 ( released July 16 th ). The update somehow altered nsswitch.conf by removing the sudoers entry.

Version-Release number of selected component (if applicable):

1.7.2p1-14.el5_8

How reproducible:

1. add a line to nsswitch.conf like 

sudoers: files ldap

2. update sudo to 1.7.2p1-14.el5_8

3. observe the file is altered and the entry is removed.

Actual results:

the sudoers entry in nsswitch.conf disappeared.

Expected results:

the sudoers entry stays as is.

Additional info:

Comment 1 Daniel Kopeček 2012-07-18 14:37:45 UTC
This is a bug in the %postun section. I'll provide a patch ASAP.

Comment 2 Daniel Kopeček 2012-07-18 15:13:37 UTC
Created attachment 598915 [details]
proposed patch

Comment 3 Daniel Kopeček 2012-07-18 16:32:09 UTC
Created attachment 598933 [details]
proposed and tested patch

[root@rhel-5-usgcb tmp]# rpm -q sudo; grep sudoers: /etc/nsswitch.conf 
sudo-1.7.2p1-14.el5_8
sudoers: files ldap

[root@rhel-5-usgcb tmp]# yum localinstall --nogpgcheck sudo-1.7.2p1-16.el5.x86_64.rpm 
Loaded plugins: katello, product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Local Package Process
Examining sudo-1.7.2p1-16.el5.x86_64.rpm: sudo-1.7.2p1-16.el5.x86_64
Marking sudo-1.7.2p1-16.el5.x86_64.rpm as an update to sudo-1.7.2p1-14.el5_8.x86_64
Resolving Dependencies
--> Running transaction check
---> Package sudo.x86_64 0:1.7.2p1-16.el5 set to be updated
--> Finished Dependency Resolution

...
...
...

Complete!

[root@rhel-5-usgcb tmp]# rpm -q sudo; grep sudoers: /etc/nsswitch.conf 
sudo-1.7.2p1-16.el5
sudoers:  files ldap

[root@rhel-5-usgcb tmp]#

Comment 9 Murray McAllister 2012-08-13 04:24:41 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Updating the sudo package resulted in the "sudoers" line in "/etc/nsswitch.conf" being removed. This update corrects the bug in the sudo package's post-uninstall script that caused this issue.

Comment 13 errata-xmlrpc 2013-01-08 07:49:55 UTC
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-2013-0112.html