summaryrefslogtreecommitdiffstats
path: root/utils/nfsd
Commit message (Collapse)AuthorAgeFilesLines
* nfsd: Bump up the default to 8 nprocsSteve Dickson2012-03-161-1/+5
| | | | | | | | When the nproc argument is not given the rpc.nfsd a default number of processes is created. This patch bumps that default up from 1 to 8. Signed-off-by: Steve Dickson <steved@redhat.com>
* autoconf: only link binaries that need it to libtirpcJeff Layton2012-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is essentially the same as the previous version, but has been respun to fix up some merge conflicts with some of Chuck's recent changes. When we first added tirpc support, we took a "big hammer" approach, and had it add libtirpc to $LIBS. That had the effect of making it so that that library was linked into every binary. That's unnecessary, and wasteful with memory. Don't let AC_CHECK_LIB add -ltirpc to $LIBS. Instead, have the autoconf tests set $(LIBTIRPC) in the makefiles, and have the programs that need it explicitly include that library. In the event that we're not using libtirpc, then set $LIBTIRPC to a blank string. This necessitates a change to the bindresvport_sa check too. Since that library is no longer included in $LIBS, we need to convert that check to use AC_CHECK_LIB instead of AC_CHECK_FUNCS. This patch also fixes a subtle bug. If the library was usable, but the includes were not, the test would set $enable_tirpc to "no", but HAVE_LIBTIRPC would still be true. That configuration would likely fail to build. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* man pages: fixed a few typos in a couple man pagesSteve Dickson2011-10-041-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsd: allow choosing server 41 support at runtimeJ. Bruce Fields2011-09-202-9/+12
| | | | | | | | | | | | | In the case where -N 4.1 is left off the commandline, the current code explicitly turns it on or off anyway, depending on configure options. Instead, just leave 4.1 support alone. This allows a user to add an "echo +4.1 >/proc/fs/nfsd/versions" to their init scripts, if they want. Otherwise they will get the kernel's default (currently to leave 4.1 off, as long as 4.1 support is experimental). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* pdate addres for Free Software FoundationNeilBrown2011-08-291-1/+1
| | | | | | | | | | | | License texts contain multiple address for FSF, some wrong. So update them and replace COPYING file with http://www.gnu.org/licenses/gpl-2.0.txt which has a few changes to preamble and commentary. Also remove extra COPYING file from utils/statd/ Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* supress socket error when address family is not supportedNeilBrown2011-05-231-2/+7
| | | | | | | | | | | | | | | | | | | | From: Suresh Jayaraman <sjayaraman@suse.de> It was observed that when ipv6 module was not loaded and cannot be auto-loaded, when starting NFS server, the following error occurs: "rpc.nfsd: unable to create inet6 TCP socket: errno 97 (Address family not supported by protocol)" This is obviously a true message, but does not represent an "error" when ipv6 is not enabled. Rather, it is an expected condition. As such, it can be confusing / misleading / distracting to display it in this scenario. This patch instead of throwing error when a socket call fails with EAFNOSUPPORT, makes it as a NOTICE. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsd: Enable IPv6 support in rpc.nfsd again.Chuck Lever2010-09-272-18/+0
| | | | | | | | Revert commit b2a3cd59 so that rpc.nfsd can create IPv6 listener sockets for the kernel. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.nfsd: mount up nfsdfs is it doesn't appear to be mounted yetJeff Layton2010-09-163-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | There's a bit of a chicken and egg problem when nfsd is run the first time. On Fedora/RHEL at least, /proc/fs/nfsd is mounted up whenever nfsd is plugged in via a modprobe.conf "install" directive. If someone runs rpc.nfsd without plugging in nfsd.ko first, /proc/fs/nfsd won't be mounted and rpc.nfsd will end up using the legacy nfsctl interface. After that, nfsd will be plugged in and subsequent rpc.nfsd invocations will use that instead. This is a problem as some nfsd command-line options are ignored when the legacy interface is used. It'll also be a problem for people who want IPv6 enabled servers. The upshot is that we really don't want to use the legacy interface unless there is no other option. To avoid this situation, have rpc.nfsd check to see if the "threads" file is already present. If it's not, then make an attempt to mount /proc/fs/nfsd. This is a "best-effort" sort of thing, however so we just ignore the return code from the mount attempt and fall back to using nfsctl() if it fails. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from nfssvc.cSteve Dickson2010-08-091-3/+3
| | | | | | | | | | nfssvc.c:184: warning: comparison between signed and unsigned integer expressions nfssvc.c: In function 'nfssvc_setvers': nfssvc.c:254: warning: comparison between signed and unsigned integer expressions nfssvc.c: In function 'nfssvc_threads': nfssvc.c:280: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsd: fix version-setting regression on old kernelsJ. Bruce Fields2010-02-041-5/+5
| | | | | | | | | | | | | | | | | /proc/fs/nfsd/versions was extended to allow turning on/off minor versions by echoing "+4.1" or "-4.1" to /proc/fs/nsfd/versions. Unfortunately, pre-2.6.30 kernels just stop parsing at first non-digit, so "-4.1" is interpreted as "-4". If new nfs-utils (on old kernel) writes "+2", "+3", "+4", then "-4.1", result therefore is to turn off 4.1. Given that historical behavior, it may have been a mistake to extend the interface the way we did; but at this point we're probably stuck with it. So, just reverse the order we write versions in. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove the AI_ADDRCONFIG hint flag to getaddrinfo() when it'sSteve Dickson2009-11-121-1/+1
| | | | | | | | | call by nfsd to set up the file descriptors that are sent to the kernel. The flag causes the getaddrinfo() to fail, with EAI_NONAME, when there is not a non-loopback network interface configured. Signed-off-by: Steve Dickson <steved@redhat.com>
* IPv6 support for nfsd was finished before some of the other daemonsJeff Layton2009-09-142-0/+18
| | | | | | | | | (mountd and statd in particular). That could be a problem in the future if someone were to boot a kernel that supports IPv6 serving with an older nfs-utils. For now, hardcode the IPv6 switch into the off position until the other daemons are functional. Signed-off-by: Steve Dickson <steved@redhat.com>
* Add some clarification about the purpose of the program, info about theJeff Layton2009-08-141-3/+22
| | | | | | | --debug and --syslog options, and a note about how it behaves when TI-RPC support is built in. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: add IPv6 support to nfsdJeff Layton2009-08-141-25/+89
| | | | | | | | | | | | | | Add support for handing off IPv6 sockets to the kernel for nfsd. One of the main goals here is to not change the behavior of options and not to add any new ones, so this patch attempts to do that. We also don't want to break anything in the event that someone has an rpc.nfsd program built with IPv6 capability, but the knfsd doesn't support IPv6. Ditto for the cases where IPv6 is either not compiled in or is compiled in and blacklisted. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Allow nfssvc_setfds to properly deal with AF_INET6.Jeff Layton2009-08-141-0/+14
| | | | | | | | IPv6 sockets for knfsd can't be allowed to accept IPv4 packets. Set the correct option to prevent that from occurring on IPv6 sockets. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: convert nfssvc_setfds to use getaddrinfoJeff Layton2009-08-143-103/+212
| | | | | | | | | | | | | | | | | | | Convert nfssvc_setfds to use getaddrinfo. Change the args that it takes and fix up nfssvc function to pass in the proper args. The things that nfssvc has to do to call the new nfssvc_setfds is a little cumbersome for now, but that will eventually be cleaned up in a later patch. nfs-utils: break up the nfssvc interface Currently, the only public interface to the routines in nfssvc.c is nfssvc(). This means that we do an awful lot of work after closing stderr that could be done while it's still available. Add prototypes to the header so that more functions in nfssvc.c can be called individually, and change the nfsd program to call those routines individually. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: move check for active knfsd to helper functionJeff Layton2009-08-011-14/+30
| | | | | | | | | nfssvc_setfds checks to see if knfsd is already running. Move this check to a helper function. Eventually the nfsd code will call this directly. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: declare a static common buffer for nfssvc.c routinesJeff Layton2009-08-011-11/+17
| | | | | | | | | | Several of the routines in nfssvc.c declare a buffer for strings. Use a shared static buffer instead to keep it off of the stack. Also, the buffer allocated in some places is *really* large. BUFSIZ is generally 8k. These routines don't need nearly that much. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: clean up NFSCTL_* macros for handling protocol bitsJeff Layton2009-08-011-0/+24
| | | | | | | | | | They are a little hard to follow currently. Clean them up and add new macros that can set these bits in addition to the ones that unset them. Also add a new macro that reports when any valid protocol bit is set. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: convert rpc.nfsd to use xlog()Jeff Layton2009-08-012-48/+66
| | | | | | | | | | | | | | | | | | ...and add --debug and --syslog options. With the switch to xlog(), it becomes trivial to add debug messages, so add an option to turn them on when requested. Also, rpc.nfsd isn't a proper daemon per-se, so it makes more sense to log errors to stderr where possible. Usually init scripts take care of redirecting stderr output to syslog anyway. For those that don't, add a --syslog option that forces all output to go to syslog instead. Note that even with this option, errors encountered during option processing will still go to stderr. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: clean up option parsing in nfsd.cJeff Layton2009-08-011-4/+4
| | | | | | | Minor formatting nits. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: move nfssvc.c to nfsd dir and clean up linking of nfsdJeff Layton2009-08-013-4/+190
| | | | | | | | | | rpc.nfsd is the only user of nfssvc.c, so we might as well move it out of libnfs.a. Also, don't link in libexport.a and libmisc.a, they aren't needed. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* utils/nfsd: enable nfs minorvers4 by defaultBenny Halevy2009-05-181-1/+1
| | | | | | | | | Enable support for the maximum minor version (4.1 at the moment) by default. It can be disabled using the -N command line option. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Extend -N command line option syntax to acceptBenny Halevy2009-05-181-3/+8
| | | | | | | | <version>.<minorversion> to disable support for <minorversion>. Only 4.1 is currently supported. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* utils/nfsd: add support for minorvers4Benny Halevy2009-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | minorvers4 can be used to either enable or disable nfsv4.x. If minorvers4 is a positive integer n, in the allowed range (only minorversion 1 is supported for now), the string "+4.n" is appended to the versions string written onto /proc/fs/nfsd/versions. Correspondingly, if minorver4 is a negative integer -n, the string "-4.n" is written. With the default value, minorvers4==0, the minor version setting is not changed. Note that unlike the protocol versions 2, 3, or 4. The minor version setting controls the *maximum* minor version nfsd supports. Particular minor version cannot be controlled on their own. With only minor version 1 supported at the moment the difference doesn't matter, but for future minor versions greater than 1, enabling minor version X will enable support for all minor versions 1 through X. Disabling minor version X will disable support for minor versions X and up, enabling 1 through X-1. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* utils/nfsd: fix -N optarg error printoutBenny Halevy2009-04-151-1/+1
| | | | | | | | | as currently printed c is the version number, not a string char, therefore is should be printed as %d not %c. That said, just print optarg as %s since it might be non-numeric. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Cleaned up the wording in the rpc.nfsd(8) manpageSteve Dickson2008-10-011-1/+1
| | | | | | (BZ: https://bugzilla.linux-nfs.org/show_bug.cgi?id=159) Signed-off-by: Steve Dickson <steved@redhat.com>
* The wrong bit field is being passed to NFSCTL_TCPISSET()Steve Dickson2007-07-161-1/+2
| | | | | | during one of the sanity checks in rpc.nfsd. Signed-off-by: Steve Dickson <steved@redhat.com>
* Add a SEE ALSO in nfsd man pageMike Frysinger2006-08-211-0/+1
|
* "rpc.nfsd XX" should not fail if ports are already open.Neil Brown2006-08-071-1/+12
| | | | | | | | | support/nfs/nfssvc.c: if any ports are already open, don't try to open any more. This means that once nfsd is running rpc.nfsd X will just change the number of threads, not the ports in use.
* Allow rpc.nfsd to suppress tcp or udp, and listen on a specific address.Steve Dickson2006-07-032-3/+65
| | | | | | | | | | -T - will suppressing listening for TCP connection. -U - will suppress UDP -H host - will only listen on that local address -p port - will listen on that port. This requires kernel patches which will hopefully be in 2.6.19 and possibly some earlier test and vendor kernels.
* Add support for suppressing different NFS versions.Steve Dickson2006-06-262-10/+49
| | | | | | e.g. -N 2 means that NFSv2 won't be supported, just v3 and v4 (if the kernel supports them).
* Remove **/Makefile.in, aclocal.m4, configure, andNeil Brown2006-04-171-593/+0
| | | | | | support/include/config.h.in from source control These are auto autogenerated by aclocal -I aclocal ; autoheader ; automake ; autoconf
* 2006-04-10 "Kevin Coffman" <kwc@citi.umich.edu>neilbrown2006-04-101-0/+2
| | | | | Check for sufficient version of librpcsecgss and libgssapi in configure.in
* 2006-04-10 "Kevin Coffman" <kwc@citi.umich.edu>neilbrown2006-04-101-0/+2
| | | | | Update aclocal/tcp-wrappers.m4 to define HAVE_LIBWRAP and HAVE_TCP_WRAPPERS as appropriate.
* aclocal/autoconf/automake, properly this time.neilbrown2006-03-281-0/+4
|
* Remove all the Makefilesneilbrown2005-12-201-35/+0
|
* More automake stuffneilbrown2005-12-201-0/+585
|
* Autogen updateneilbrown2005-12-202-1/+59
|
* Assorted changes from Steve Dicksonneilbrown2005-10-061-3/+1
|
* Added TOP, as needed, for easier compile in subdirectoriesgmorris2005-04-121-0/+1
|
* new man page - nfsd.7neilbrown2003-07-031-1/+0
|
* 2002-09-12 H.J. Lu <hjl@lucon.org>hjl2002-09-121-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Check svctcp_socket and svcudp_socket. * configure: Regenerated. * support/include/config.h.in (HAVE_SVCTCP_SOCKET): New. (HAVE_SVCUDP_SOCKET): New. * support/include/nfslib.h (svctcp_socket): New. (svcudp_socket): New. * support/nfs/Makefile (OBJS): Add svc_socket.o. * support/nfs/svc_socket.c: New. * support/nfs/rpcmisc.c (rpc_init): Call svctcp_socket and svcudp_socket if port is unspecified. * utils/nfsd/nfsd.c (main): Call getservbyname for port. * utils/rquotad/rquota_svc.c: Include <nfslib.h>. (killer): New. Signal handler to unregister. (main): Use killer. Call svcudp_socket to get the default socket.
* 2002-08-26 Chip Salzenberg <chip@pobox.com>chip2002-08-261-1/+1
| | | | | * utils/nfsd/nfsd.man: Fix typo. * debian/changelog: Version 1.0.1-1.
* 2001-11-26 Chip Salzenberg <chip@pobox.com>chip2001-11-261-3/+25
| | | | | | | | | | * utils/showmount/showmount.c (main): Don't assume that strings starting with digits are IP addresses. * utils/nfsd/nfsd.c (main): Close all fds and reopen 0,1,2 on /dev/null before nfssvc(). Use syslog to report nfssvc errors. * support/misc/tcpwrapper.c, utils/mountd/mountd.man, utils/rquotad/rquotad.man, utils/statd/statd.man: Fix comments and man pages: We check host names *and* addresses with tcpwrappers.
* 2001-05-28 H.J. Lu <hjl@lucon.org>hjl2001-05-281-0/+9
| | | | | | | * utils/lockd/lockd.c (main): chdir to NFS_STATEDIR. * utils/mountd/mountd.c (main): Likewise. * utils/nfsd/nfsd.c (main): Likewise. * utils/rquotad/rquota_svc.c (main): Likewise.
* Initial revisionhjl1999-10-183-0/+149