Bug 747335 - yppasswdd returns success when /etc/passwd.adjunct is not writable
Summary: yppasswdd returns success when /etc/passwd.adjunct is not writable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ypserv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 747317
Blocks: 747334
TreeView+ depends on / blocked
 
Reported: 2011-10-19 14:21 UTC by Honza Horak
Modified: 2011-12-10 19:45 UTC (History)
3 users (show)

Fixed In Version: ypserv-2.26-8.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of: 747317
Environment:
Last Closed: 2011-12-10 19:45:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Honza Horak 2011-10-19 14:21:50 UTC
+++ This bug was initially created as a clone of Bug #747317 +++

Description of problem:
If rpc.yppasswdd cannot write into /etc/passwd.adjunct (or /etc/shadow in standard configuration) because of wrong SELinux context, rpc.yppasswdd still reports success, which is wrong.

Version-Release number of selected component (if applicable):
ypserv-2.19-8.el5

How reproducible:
every-time

Steps to Reproduce:
1. change context of /etc/shadow or /etc/passwd.adjunct to wrong one
# chcon -t etc_t /etc/passwd.adjunct
2. try to change password of a user using yppasswd
3. /etc/passwd.adjunct is not updated and a message "Cannot create backup file /etc/passwd.adjunct.OLD: Permission denied" is logged into /var/log/messages
  
Actual results:
yppasswd returns success, so as rpc.yppasswdd in /var/log/messages

Expected results:
yppasswd returns failure, so as rpc.yppasswdd in /var/log/messages

--- Additional comment from hhorak on 2011-10-19 10:14:06 EDT ---

Created attachment 529012 [details]
proposed patch that reports failure when rename() fails

Comment 1 Fedora Update System 2011-11-28 11:47:51 UTC
ypserv-2.26-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/ypserv-2.26-8.fc16

Comment 2 Fedora Update System 2011-11-29 00:08:30 UTC
Package ypserv-2.26-8.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ypserv-2.26-8.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16503/ypserv-2.26-8.fc16
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-12-10 19:45:35 UTC
ypserv-2.26-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


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