This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 456249 - ypserv init scripts false dependency on domainname
ypserv init scripts false dependency on domainname
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ypserv (Show other bugs)
6.4
All Linux
low Severity low
: rc
: 6.5
Assigned To: Matej Mužila
Tomas Dolezal
Jiri Herrmann
: Patch
Depends On:
Blocks: 947782 1159825
  Show dependency treegraph
 
Reported: 2008-07-22 10:16 EDT by Kevin Graham
Modified: 2016-05-31 07:05 EDT (History)
5 users (show)

See Also:
Fixed In Version: ypserv-2.19-31.el6
Doc Type: Bug Fix
Doc Text:
*ypserv* no longer fails if the `domainname` parameter is unset Previously, the *ypserv* service failed to start when the `domainname` parameter was not set in the `/etc/init.d/ypserv` file. This update moves the check for `domainname` to the *yppasswdd* service, and in the described circumstances, *ypserv* now starts as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 16:33:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch moving domainname checking from ypserv to yppasswdd (1012 bytes, patch)
2012-05-14 07:55 EDT, Honza Horak
no flags Details | Diff

  None (edit)
Description Kevin Graham 2008-07-22 10:16:07 EDT
Description of problem:

Presently, ypserv's init script attempts to check if a domainname is set,
exiting if it hasn't. This is based on the false assumption that a machine
running ypserv is also a client, or that the domainname has some relevance to
the operation of ypserv. Neither of these is true, and the local domainname is
never used by ypserv (clients always provide the domainname for which they wish
to query).

Version-Release number of selected component (if applicable):

ypserv-2.13-18

How reproducible:

Steps to Reproduce:
1. Do not configure a machine as a YP client.
2. Start ypserv via init script.
  
Actual results:

Init script will exit.

Expected results:

ypserv should start.

Additional info:

All that is required is:

$ diff /etc/init.d/ypserv.orig /etc/init.d/ypserv
31,32d30
<           else
<               exit 1
$

...resulting in no changes to the daemon's actual operation.
Comment 1 Vitezslav Crhonek 2008-08-26 06:13:39 EDT
Well, I think you're right. Although possibly in every NIS HOWTO/FAQ/tutorial I have ever read is statement, that NIS server must be also NIS client. But this is true IMHO only in case of slave server. Domainname is used during database update and /var/yp/Makefile will check its value when is used. So there's no need to check it in init script.
Comment 2 Kevin Graham 2008-08-29 17:37:07 EDT
> but this is true IMHO only in case of slave server. Domainname is used during
> database update and /var/yp/Makefile will check its value when is used. So
> there's no need to check it in init script.

The ypserv daemon doesn't require the system to be a client in any circumstances; the RPC calls all identify the domain the client is interested in (going back to the fact that a ypserv can serve an arbitrary number of domains, none of which it is required to be a member of).

The Makefile also doesn't present this requirement (though it will fallback to using the local domainname). I was going to open a bug similar to comment 0 for 'ypinit', as the script itself is the only part that requires the local domain to be set (replace `domainname` with any domain and it will operate as expected).
Comment 3 RHEL Product and Program Management 2008-10-31 12:36:09 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 4 Honza Horak 2012-05-14 07:48:38 EDT
As RHEL-4.9 is the last update for RHEL-4 and it should address only security, performance and critical issues, I'm moving the bugzilla to RHEL-5.

I also changed behaviour of ypserv service in Fedora Rawhide, so it doesn't fail anymore in case domainname is not set. However, domainname is needed for updating maps properly after password change, so I added this check to yppasswdd service instead.
Comment 5 Honza Horak 2012-05-14 07:55:28 EDT
Created attachment 584347 [details]
patch moving domainname checking from ypserv to yppasswdd
Comment 6 RHEL Product and Program Management 2012-06-11 21:05:49 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 7 Honza Horak 2013-03-13 13:42:14 EDT
There is no chance to fix this in RHEL-5 any more, since RHEL 5.10 is going to include only serious fixes. Re-assigning to RHEL-6.
Comment 21 errata-xmlrpc 2016-05-10 16:33:48 EDT
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.

https://rhn.redhat.com/errata/RHBA-2016-0793.html

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