freebsd-dev/etc/mtree
Alan Somers a85f12322c "source routing" in rpcbind
Fix a bug in rpcbind for multihomed hosts. If the server had interfaces on
two separate subnets, and a client on the first subnet contacted rpcbind at
the address on the second subnet, rpcbind would advertise addresses on the
first subnet. This is a bug, because it should prefer to advertise the
address where it was contacted. The requested service might be firewalled
off from the address on the first subnet, for example.

usr.sbin/rpcbind/check_bound.c
	If the address on which a request was received is known, pass that
	to addrmerge as the clnt_uaddr parameter. That is what addrmerge's
	comment indicates the parameter is supposed to mean. The previous
	behavior is that clnt_uaddr would contain the address from which the
	client sent the request.

usr.sbin/rpcbind/util.c
	Modify addrmerge to prefer to use an IP that is equal to clnt_uaddr,
	if one is found. Refactor the relevant portion of the function for
	clarity, and to reduce the number of ifdefs.

etc/mtree/BSD.tests.dist
usr.sbin/rpcbind/tests/Makefile
usr.sbin/rpcbind/tests/addrmerge_test.c
	Add unit tests for usr.sbin/rpcbind/util.c:addrmerge.

usr.sbin/rpcbind/check_bound.c
usr.sbin/rpcbind/rpcbind.h
usr.sbin/rpcbind/util.c
	Constify some function arguments

Reviewed by:	imp
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4690
2016-01-06 00:00:11 +00:00
..
BSD.debug.dist Upgrade our copies of clang and llvm to 3.7.1 release. This is a 2015-12-25 21:39:45 +00:00
BSD.groff.dist Flesh out WITHOUT_GROFF support to DTRT. 2011-02-22 08:13:49 +00:00
BSD.include.dist Add lib80211 to include path. 2015-11-30 04:59:01 +00:00
BSD.lib32.dist Handle lib32 files during delete-old* when MK_LIB32=no. 2015-10-20 20:35:34 +00:00
BSD.libsoft.dist Add libsoft to the tree, just like lib32. 2016-01-03 04:32:05 +00:00
BSD.release.dist
BSD.root.dist Create a /boot/dtb directory to house DTB blobs. The flattened device 2014-09-03 21:59:07 +00:00
BSD.sendmail.dist
BSD.tests.dist "source routing" in rpcbind 2016-01-06 00:00:11 +00:00
BSD.usr.dist Upgrade our copies of clang and llvm to 3.7.1 release. This is a 2015-12-25 21:39:45 +00:00
BSD.var.dist Add default leap-seconds file. This should help ntp networks get the 2015-10-16 14:04:16 +00:00
Makefile Add libsoft to the tree, just like lib32. 2016-01-03 04:32:05 +00:00
README Fix a small typo nit 2011-01-19 20:16:47 +00:00

$FreeBSD$

Note: If you modify these files, please keep hier(7) updated!

These files are used to create empty file hierarchies for building the
system into.  Some notes about working with them are placed here to try
and keep them in good working order.

    a)  The files use 4 space indentation, and other than in the header
        comments, should not contain any tabs.  An indentation of 4 is
        preferable to the standard indentation of 8 because the indentation
        of levels in these files can become quite deep causing the line to
        overflow 80 characters.

        This also matches with the files generated when using the
        mtree -c option, which was implemented that way for the same reason.

    b)  Only directories should be listed here.

    c)  The listing should be kept in filename sorted order.

    d)  Sanity checking changes to these files can be done by following
        this procedure (the sed -e is ugly, but fixing mtree -c to
        not emit the trailing white space would be even uglier):

            mkdir /tmp/MTREE
            mtree -deU -f BSD.X.dist -p /tmp/MTREE
            mtree -cdin -k uname,gname,mode -p /tmp/MTREE | \
		sed -e 's/ *$//' >BSD.X.new
            diff -u BSD.X.dist BSD.X.new
            rm -r /tmp/MTREE

        Note that you will get some differences about /set lines,
        and uname= gname= on certain directory areas, mainly man page
        sections.  This is caused by mtree not having a look ahead
        mechanism for making better selections for these as it
        traverses the hierarchy.

        The BSD.X.new file should NOT be committed, as it will be missing
        the correct header, and important keywords like ``nochange''.
        Simply use the diff for a sanity check to make sure things are in
        the correct order and correctly indented.

    e)  Further sanity checking of the system builds with DESTDIR=/someplace
        are more complicated, but can often catch missing entries in these
        files.  I tend to run this more complete sanity check shortly after
        the target date for a new release is announced.

        If you want details on it bug me about it via email to
        rgrimes@FreeBSD.org.