<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/ypbind, branch upstream/2.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F2.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F2.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>1997-03-06T08:01:10Z</updated>
<entry>
<title>YAMFC:</title>
<updated>1997-03-06T08:01:10Z</updated>
<author>
<name>Mike Pritchard</name>
<email>mpp@FreeBSD.org</email>
</author>
<published>1997-03-06T08:01:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a5b108bc51bd1997e5c44253d326c14a5ffda682'/>
<id>urn:sha1:a5b108bc51bd1997e5c44253d326c14a5ffda682</id>
<content type='text'>
- sort xrefs
- typo fixes.
</content>
</entry>
<entry>
<title>YAMFC (rev 1.20)</title>
<updated>1997-01-12T21:44:54Z</updated>
<author>
<name>Joerg Wunsch</name>
<email>joerg@FreeBSD.org</email>
</author>
<published>1997-01-12T21:44:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e3413d2cbe70000b67718319648a08aef013c37'/>
<id>urn:sha1:3e3413d2cbe70000b67718319648a08aef013c37</id>
<content type='text'>
</content>
</entry>
<entry>
<title>delete doubled words, e.g.: "the the" -&gt; "the"</title>
<updated>1996-10-05T22:27:30Z</updated>
<author>
<name>Wolfram Schneider</name>
<email>wosch@FreeBSD.org</email>
</author>
<published>1996-10-05T22:27:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e83201b43ad36d453a46f551fcaedf0a0e7f23c3'/>
<id>urn:sha1:e83201b43ad36d453a46f551fcaedf0a0e7f23c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Correct a bunch of man page cross references and generally</title>
<updated>1996-02-11T22:38:05Z</updated>
<author>
<name>Mike Pritchard</name>
<email>mpp@FreeBSD.org</email>
</author>
<published>1996-02-11T22:38:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=78b0b234eb5a179413189a3e2561e894c9c18135'/>
<id>urn:sha1:78b0b234eb5a179413189a3e2561e894c9c18135</id>
<content type='text'>
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
</content>
</entry>
<entry>
<title>More XDR routine cleanups. These three programs should be the only</title>
<updated>1995-12-15T03:39:46Z</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>1995-12-15T03:39:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7db881e1625974c90dfaef886267877d938a2906'/>
<id>urn:sha1:7db881e1625974c90dfaef886267877d938a2906</id>
<content type='text'>
ones that require this: the others call the yplib functions in libc.
</content>
</entry>
<entry>
<title>Add a -S option to ypbind that allows the following:</title>
<updated>1995-07-20T22:33:02Z</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>1995-07-20T22:33:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a974cefe6ea739aed920f1530ee955dfd85a49cc'/>
<id>urn:sha1:a974cefe6ea739aed920f1530ee955dfd85a49cc</id>
<content type='text'>
     -S domainname,server1,server2,server3,...
           The -S flag allows the system administrator to lock ypbind to a
           particular domain and group of NIS servers. Up to ten servers can
           be specified.  There must not be any spaces between the commas in
           the domain/server specification. This option is used to insure that
           that the system binds only to one domain and only to one of the
           specified servers, which is useful for systems that are both NIS
           servers and NIS clients: it provides a way to restrict what ma-
           chines the system can bind to without the need for specifying the
           -ypset or -ypsetme options, which are often considered to be secu-
           rity holes. The specified servers must have valid entries in the
           local /etc/hosts file. IP addresses may be specified in place of
           hostnames. If ypbind can't make sense ouf of the arguments, it will
           ignore the -S flag and continue running normally.

           Note that ypbind will consider the domainname specified with the -S
           flag to be the system default domain.

(According to what Garrett showed me, OSF/1 actually only allows 4 servers
to be specified. Ten seemed to be a bit more reasonable to me.)

Suggested by: G. Wollman
Idea lifted from: OSF/1
</content>
</entry>
<entry>
<title>Some small signal handling tweaks: be sure to keep wait3()ing until all</title>
<updated>1995-07-15T23:27:49Z</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>1995-07-15T23:27:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1ede0846a733f93a6ece47872aabd2c886fdae92'/>
<id>urn:sha1:1ede0846a733f93a6ece47872aabd2c886fdae92</id>
<content type='text'>
children are reaped and make sure to block SIGCHLD delivery during handler
execution when installing SIGCHLD handler with sigaction().
</content>
</entry>
<entry>
<title>Remove trailing whitespace.</title>
<updated>1995-05-30T03:57:47Z</updated>
<author>
<name>Rodney W. Grimes</name>
<email>rgrimes@FreeBSD.org</email>
</author>
<published>1995-05-30T03:57:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=709e8f9ae1d734c1a163c9b421df4b8153939ce7'/>
<id>urn:sha1:709e8f9ae1d734c1a163c9b421df4b8153939ce7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>This is another bug fix that should have gone into my last commit. I</title>
<updated>1995-05-29T16:39:52Z</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>1995-05-29T16:39:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=236f9a3ab9b142e14b702ec5b89360d3840c82de'/>
<id>urn:sha1:236f9a3ab9b142e14b702ec5b89360d3840c82de</id>
<content type='text'>
actually had this done at one point and lost it somewhere along the
line. Again, this is an honest to gosh bug fix only: no functionality
is changed.

- After a child broadcaster process dies or is killed, set its dom_pipe_fds
descriptors to -1 so that the 'READFD &gt; 0' test in the select() loop
does the right thing.

Since descriptor values can be re-used, failure to do this can lead
to a situation where a descriptor for an RPC socket can be mistaken for
a pipe. If this happens, RPC sockets could be incorrectly handed off to
handle_children(), which would then clear the descriptor from the select()
descriptor mask and prevent svc_getreqset() from handling them. The end
result would be that some RPC events would go unserviced. Curiously,
the failures only happen intermittently.
</content>
</entry>
<entry>
<title>Reviewed by:	rgrimes, jkh and davidg (sort of)</title>
<updated>1995-05-26T05:28:00Z</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>1995-05-26T05:28:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a7acf629b6a1a575e81968be19b9226790d246f9'/>
<id>urn:sha1:a7acf629b6a1a575e81968be19b9226790d246f9</id>
<content type='text'>
Rod, Jordan and David have more or less given me the OK on this
with the understanding that it doesn't change any functionality.
It doesn't: these are bug fixes only. No other part of the system
should be affected. Of course, since I'm the only one working on
NIS, you'll just have to take my word on it. :)

Fixes for the following annoyingly subtle bugs:

- ypbindproc_setdom_2 is supposed to be declared void *, not boot_t *,
and it fails to correctly signal failures back to the ypset(8) command:
we need to call one of the svcerr_*() functions (in this case,
svcerr_noprog() seems a logical choice -- we're really cheating
a bit here because nothing else quite fits) to tell ypset that the
attempt to set the binding for a domain failed. If we don't do this,
failed ypset attempts either appear (incorrectly) to succeed, or
they time out.

- The lock handling for child processes isn't quite right. The
child broadcaster processes have to release all locks on the
binding files and the ypbind.lock file.

- The parent ypbind process will SEGV if you do the following:

-- start ypbind with the -ypset or -ypsetme flag
-- type 'ypwhich -d random_unserved_domain'
-- type 'ypset -d random_unserved_domain anyhost'
-- type 'ypwhich -d random_unserved_domain' again
-- wait about 60 seconds

What happens is this: the ypwhich command causes ypbind to fork a
broadcaster process that searches for a server for random_unserved_domain.
If you then use ypset to force a binding while this process is still alive,
the state flags that tell the ypbind parent process that the child
is running will be cleared. The second ypwhich command then causes
a *second* child process to be forked for random_unserved_domain,
which is verbotten. When the first broadcaster exits and tells the
parent that it wasn't able to find a server for the domain, the parent
clobbers the entry for random_unserved_domain. Then the second broadcaster
exits and the same thing happens, only trying to clobber the entry
twice causes a SEGV.

The fix for this is a slight change in program structure: since we
can't have more than one broadcaster for a given domain at a time,
we save the pipe descriptors and pid for the child broadcaster in members
of the _dom_binding struct for the domain. (As a side effect, we
can get rid of the global child_fds variable.) So when rpc_received()
finds that it's been asked to do a ypset for a domain for which a
broadcaster process exists, it sends a SIGINT to the child to kill it
and closes the pipe to the now-dead child. This keeps everything in sync
and insures that we don't leak file descriptors.

- ping() should be using YPPROC_DOMAIN rather than YPPROC_DOMAIN_NONACK
when it does its clnt_call() to the server.

- Removed the check for client_handle == NULL in ping() and make
client_handle local to ping instead of a member of the _dom_binding
struct. This fixes another potential ypset problem: using ypset to
force a binding to a machine that has an NIS server but which *doesn't*
support the domain we're after can result in permanently bogus bindings.

- the 'server OK' message prints the wrong IP address.
</content>
</entry>
</feed>
