Bug 1004110 - ypserv 2.31 with tcbdb returns no error if nis map does not exist
Summary: ypserv 2.31 with tcbdb returns no error if nis map does not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ypserv
Version: 19
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 00:57 UTC by Edgar Hoch
Modified: 2013-09-23 00:45 UTC (History)
1 user (show)

Fixed In Version: ypserv-2.31-5.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-23 00:45:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for ypserv-2.31/lib/yp_db.c to return the right error code when using tcbdb (401 bytes, patch)
2013-09-04 00:59 UTC, Edgar Hoch
no flags Details | Diff

Description Edgar Hoch 2013-09-04 00:57:31 UTC
Description of problem:
ypserv 2.31 with tcbdb returns no error code if a nis map does not exist. Instead it returns an empty map.

If using gdbm as in previous Fedora version (e.g. Fedora 16), ypserv returns an error code (which can be interpreted by the calling client, e.g. ypcat etc.).


Version-Release number of selected component (if applicable):
ypserv-2.31-2.fc19.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Configure and start a nis server with ypserv 2.31 and tcbdb, for example ypserv on Fedora 19. Lets name this server ypservera.
2. Configure and start a nis server with ypserv 2.29 (or 2.31) and gdbm, for example ypserv on Fedora 16.Lets name this server ypserverb.
3. On a Fedora 19 host (may be a nis client, but this is not neccecary) enter two commands:
  3a: "LANG=C ypcat -k -h ypservera -t thismapdoesnotexist"
  3b: "LANG=C ypcat -k -h ypserverb -t thismapdoesnotexist"

Actual results:
  3a: No output.
      Error code: 0
  3b: Output: "No such map thismapdoesnotexist. Reason: No such map in server's domain"
      Error code: 1

Expected results:
  3a: Output: "No such map thismapdoesnotexist. Reason: No such map in server's domain"
      Error code: 1
  3b: Output: "No such map thismapdoesnotexist. Reason: No such map in server's domain"
      Error code: 1

Comment 1 Edgar Hoch 2013-09-04 00:59:17 UTC
Created attachment 793386 [details]
Patch for ypserv-2.31/lib/yp_db.c to return the right error code when using tcbdb

Comment 2 Honza Horak 2013-09-04 11:33:01 UTC
Thanks for the report and patch. I'll fix it soon.

Comment 3 Fedora Update System 2013-09-04 12:07:21 UTC
ypserv-2.31-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ypserv-2.31-5.fc20

Comment 4 Fedora Update System 2013-09-04 16:05:48 UTC
Package ypserv-2.31-5.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ypserv-2.31-5.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15735/ypserv-2.31-5.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-09-23 00:45:57 UTC
ypserv-2.31-5.fc20 has been pushed to the Fedora 20 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.