rpc.nfsd: No longer advertise NFS v2 support.

Changed the default protocol versions that rpc.nfsd
register with rpcbind to just 3 and 4. Version 2
can still be enabled with the '-V' flag, but it
will not be on by default.

Signed-off-by: Steve Dickson <steved@redhat.com>
rpc.nfsd: Allow v4.2 server support with the -V option

Signed-off-by: Steve Dickson <steved@redhat.com>
rpc.idmapd: silence pointless EOF warning

RH bz 831455 has a report that repeatedly mounting and unmounting over
lo can hit this warning in the EOF case.  I suspect that's just
normal--I'm not sure of the details, but probably idmapd gets woken up
to check for an upcall and then the upcall gets yanked away before
idmapd gets a chance to read it.

So just skip the warning in that case.  I also can't see a reason to
reopen.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
mount.nfs: dont pass options from configuration sections that are not relevant

The nfsmount.conf file has the following format:

[ section "arg" ]
	tag = value

conf_get_tag_list() currently doesn't check the arg field so we wind up
getting all the options that fall under a particular section value,
instead of just the ones that match the specific "arg" field.  As a
result, we wind up passing options to the mount syscall from sections
that aren't even relevant to the mount operation that is being
performed.

For example, if we have three different server sections, and each
section has an Nfsvers tag, then the string we pass to the mount syscall
will have two extra occurrences of the nfsvers option.  Each option
should appear at most 4 times -- once for the system section, once for
the server-specific section, once for the mount-specific section, and
once for the command line mount options.

Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
mount.nfs: improve handling of bg, fg, and sloppy in nfsmount.conf

This patch makes 2 small improvements to the parsing of the bg, fg, and
sloppy mount options in nfsmount.conf.

1. "bg" and "fg" negate should each other.  "Background=True" should
mean "bg" and "Background=False" should mean "fg".  The same applies to
"Foreground".

2. Once we see "Sloppy=False" while parsing the configuration file we
should ignore subsequent occurrences of the sloppy option.  This will
preserve the "right-most setting wins" behavior for the sloppy mount
option.

Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>