Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 598933 Details for
Bug 841070
sudo 1.7.2p1-14.el5_8 removed sudoers line from nsswitch.conf
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed and tested patch
sudo.spec.patch (text/plain), 2.38 KB, created by
Daniel Kopeček
on 2012-07-18 16:32:09 UTC
(
hide
)
Description:
proposed and tested patch
Filename:
MIME Type:
Creator:
Daniel Kopeček
Created:
2012-07-18 16:32:09 UTC
Size:
2.38 KB
patch
obsolete
>diff --git a/sudo.spec b/sudo.spec >index b27de0e..7ad0e2f 100644 >--- a/sudo.spec >+++ b/sudo.spec >@@ -1,12 +1,12 @@ > %define nsswitch_path "/etc/nsswitch.conf" >-%define nsswitch_line "sudoers: files ldap" >-%define nsswitch_regex "^sudoers: files ldap$" >+%define nsswitch_line "sudoers: files ldap" >+%define nsswitch_regex "^sudoers: files ldap$" > %define nsswitch_tmppath "%{_tmppath}/nsswitch.conf.bak" > > Summary: Allows restricted root access for specified users. > Name: sudo > Version: 1.7.2p1 >-Release: 15%{?dist} >+Release: 16%{?dist} > License: BSD > Group: Applications/System > URL: http://www.courtesan.com/sudo/ >@@ -205,22 +205,40 @@ rm -rf $RPM_BUILD_ROOT > %post > /bin/chmod 0440 /etc/sudoers || : > >-if ! grep -q '^[[:space:]]*sudoers:' "%{nsswitch_path}"; then >+# >+# rhbz#841070: remove the old line, the new one won't be matched >+# by the old regexp and won't be deleted on upgrade >+# >+if grep -q '^sudoers: files ldap$' %{nsswitch_path}; then >+ rm -f %{nsswitch_tmppath} && \ >+ touch %{nsswitch_tmppath} && \ >+ grep -v '^sudoers: files ldap$' %{nsswitch_path} > %{nsswitch_tmppath} && \ >+ mv -f %{nsswitch_tmppath} %{nsswitch_path} >+ restorecon %{nsswitch_path} >+fi >+ >+if ! grep -q '^[[:space:]]*sudoers:' %{nsswitch_path}; then > # No "sudoers:" line in nsswitch.conf, add a default one >- echo "%{nsswitch_line}" >> "%{nsswitch_path}" >+ echo %{nsswitch_line} >> %{nsswitch_path} >+ restorecon %{nsswitch_path} > fi > > %postun > # Remove the "sudoers:" line from nsswitch.conf if it's not modified >-if grep -q %{nsswitch_regex} "%{nsswitch_path}"; then >- rm -f "%{nsswitch_tmppath}" && \ >- touch "%{nsswitch_tmppath}" && \ >- grep -v %{nsswitch_regex} "%{nsswitch_path}" > "%{nsswitch_tmppath}" && \ >- mv -f "%{nsswitch_tmppath}" "%{nsswitch_path}" >- restorecon "%{nsswitch_path}" >+# and only when we are erasing (not upgrading) the package! >+if [ $1 = 0 ] && grep -q %{nsswitch_regex} %{nsswitch_path}; then >+ rm -f %{nsswitch_tmppath} && \ >+ touch %{nsswitch_tmppath} && \ >+ grep -v %{nsswitch_regex} %{nsswitch_path} > %{nsswitch_tmppath} && \ >+ mv -f %{nsswitch_tmppath} %{nsswitch_path} >+ restorecon %{nsswitch_path} > fi > > %changelog >+* Wed Jul 18 2012 Daniel Kopecek <dkopecek@redhat.com> - 1.7.2p1-15 >+- corrected postun script >+ Resolves: rhbz#841070 >+ > * Mon Jul 2 2012 Daniel Kopecek <dkopecek@redhat.com> - 1.7.2p1-15 > - corrected release number >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 841070
:
598915
| 598933