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 695754

Summary: rpc.yppasswd returns epmty string instead of error messages
Product: Red Hat Enterprise Linux 5 Reporter: Karel Volný <kvolny>
Component: ypservAssignee: Honza Horak <hhorak>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: low    
Version: 5.6CC: azelinka, ovasik, psklenar
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:53:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch
none
proposed patch that adds more info to error messages none

Description Karel Volný 2011-04-12 15:17:47 UTC
Description of problem:
I'm unable to get reasonable error messages from rpc.yppasswdd, see below

Version-Release number of selected component (if applicable):
ypserv-2.19-5.el5_6.1

How reproducible:
always

Steps to Reproduce:
1. setup NIS
2. run rpc.yppasswd --debug on the server
3. try to change user password via yppasswd

  
Actual results:
.qa.[root@x86-64-5s-m1 ~]# rpc.yppasswdd --debug -x /usr/lib64/yp/bz681699-test
rpc.yppasswdd - NYS YP server version 2.19

yppasswdproc_pwupdate("bz681699") [From: 10.16.112.103:704]
        oldpass..: heslo1
        pw_name..: bz681699
        pw_passwd: $1$lH91as4C$EP.HfSYBPC1yjjoYN9Urs1
        pw_gecos.: 
        pw_dir...: /home/bz681699
        pw_shell.: /bin/bash
fgets() call failed.
 failed.  Change request: bz681699 o:heslo1 p:$1$lH91as4C$EP.HfSYBPC1yjjoYN9Urs1 
Response was 



Expected results:
[what?] failed.
Response was [what?]

Additional info:

Comment 1 Honza Horak 2011-04-12 16:16:26 UTC
Created attachment 491526 [details]
proposed patch

This failure is most probably caused by empty output of the external script, so fgets() returns NULL, same as there is an error in reading. 

However, feof() and ferror() hangs in this case, so I can't use them to distinguish what exactly is wrong. The proposed patch describes the problem a bit better, I think it could be good enough for this failure.

Any comments or improvement suggestions are welcome.

Comment 9 errata-xmlrpc 2012-02-21 05:53:32 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-2012-0205.html