Bug 126224
Summary: | [PATCH] yp_all() fails to send YP_NOMORE | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Aaron Spangler <spangla> | ||||||
Component: | ypserv | Assignee: | Steve Dickson <steved> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Jay Turner <jturner> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 3.0 | CC: | srevivo, tao | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2004-09-02 06:07:10 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
Aaron Spangler
2004-06-17 19:04:41 UTC
The ypserv-2.8 code curently attempts to send the YP_NOMORE status after the last key/value pair is sent, however due to an off by one error in ypserv/ypserv_xdr.c, the last status record is suppressed. Created attachment 101224 [details]
ypserv-2.8-nomore.patch
Created attachment 101607 [details]
Attache nomore patch
At first I was not too keen on adding an extra ypall entry just to set the YP_NOMORE status, so I looked into changing ypserver to return the YP_NOMORE status on the last ypall entry that had real data (i.e. exactly how SUN does it). It turns out this approach breaks the yp_all() glibc routine since it only expects ypall entries with a YP_TRUE status to contain data. So the ypall entries (that contained data) but had a YP_NOMORE status were being dropped. So attached is a patch that does the same thing as the original patch but makes sure the YP_NOMORE entries contain zeros instead of garbage. Tried the augmented patch supplied by Steve. Tried in pre-prod environment. Works great! Exactly what we are looking for. Thanks. An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-394.html |