conf/117555: [patch] NIS-dependent services cannot start if ypbind uses ypset

John Marshall john at
Sat Oct 27 03:00:11 PDT 2007

>Number:         117555
>Category:       conf
>Synopsis:       [patch] NIS-dependent services cannot start if ypbind uses ypset
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 27 10:00:09 UTC 2007
>Originator:     John Marshall
>Release:        FreeBSD 7.0-BETA1 i386
Riverwillow Pty Ltd
System: FreeBSD 7.0-BETA1 FreeBSD 7.0-BETA1 #0: Sat Oct 20 10:13:47 AEST 2007 root at i386

/etc/rc.d/ypset needs to be relocated within the rc order so that it comes after /etc/rc.d/ypbind and before anything which requires ypbind. At present, ypset is not REQUIREd by any other rc.d scripts and falls through to way near the end of rcorder. If an NIS client's ypbind does not use ypset for its configuration, then this oversight has no impact at all: ypset does not need to run and ypbind will be properly configured and functional after /etc/rc.d/ypbind. If, however, ypbind is set to be configured by ypset, it will not be functional until after ypset has run.

For an installation that does use ypset, /etc/rc.d/ypset starts way too late in rcorder and cannot configure ypbind before ypbind consumers attempt to start. Those NIS-dependent services will not be able to start because they are waiting for NIS services which cannot be provided because ypbind has not yet been configured by ypset. The NIS-dependent services wait indefinately (unless someone is around to hit ctrl-C) and rc does not complete.

I am proposing that those rc.d scripts which REQUIRE "ypbind" be changed to REQUIRE "ypset" instead. /etc/rc.d/ypset already REQUIREs "ypbind", so that keeps the ypbind dependency while relocating ypset to an appropriate position within the rc order.

Scripts which currently REQUIRE "ypbind" are:
- /etc/rc.d/amd
- /etc/rc.d/keyserv
- /etc/rc.d/yppasswdd

Another script which does not currently REQUIRE "ypbind" but has a comment saying that ypbind must already be started is /etc/rc.d/quota. This script just happens to land in the right spot in rcorder so the missing ypbind REQUIRE hasn't been a problem - but I think that omission should be corrected while we're at it.

Testing this solution on this system has shown that the only affect upon rcorder is the re-positioning of ypset. /etc/rc.d/ypset moves from way near the end to immediately after /etc/rc.d/ypbind - and nothing else moves. Please see the following thread in the rc mailing list for details of the symptoms, analysis and test results:

My one misgiving about this proposal is that "REQUIRE ypset" does not make the ypbind dependency immediately apparent.

nis_client_flags="-ypsetme -s"


--- /usr/src/etc/rc.d/amd	2006-10-19 01:56:11.000000000 +1000
+++ /etc/rc.d/amd	2007-10-25 10:40:36.000000000 +1000
@@ -5,7 +5,7 @@
 # PROVIDE: amd
-# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig
+# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig
 # KEYWORD: nojail

--- /usr/src/etc/rc.d/keyserv	2004-10-07 23:55:26.000000000 +1000
+++ /etc/rc.d/keyserv	2007-10-25 10:40:36.000000000 +1000
@@ -7,7 +7,7 @@
 # PROVIDE: keyserv
-# REQUIRE: ypbind
+# REQUIRE: ypset
 . /etc/rc.subr

--- /usr/src/etc/rc.d/yppasswdd	2007-10-12 12:38:42.000000000 +1000
+++ /etc/rc.d/yppasswdd	2007-10-25 10:40:36.000000000 +1000
@@ -5,7 +5,7 @@
 # PROVIDE: yppasswdd
-# REQUIRE: ypserv ypbind
+# REQUIRE: ypserv ypset
 . /etc/rc.subr

--- /usr/src/etc/rc.d/quota	2007-10-12 12:38:42.000000000 +1000
+++ /etc/rc.d/quota	2007-10-25 10:55:52.000000000 +1000
@@ -7,7 +7,7 @@
 # PROVIDE: quota
-# REQUIRE: mountcritremote
+# REQUIRE: mountcritremote ypset
 # KEYWORD: nojail

More information about the freebsd-bugs mailing list