summaryrefslogtreecommitdiffstats
path: root/utils/nfsd/nfsd.c
Commit message (Collapse)AuthorAgeFilesLines
* IPv6 support for nfsd was finished before some of the other daemonsJeff Layton2009-09-141-0/+9
| | | | | | | | | (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>
* 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>
* nfs-utils: convert nfssvc_setfds to use getaddrinfoJeff Layton2009-08-141-28/+67
| | | | | | | | | | | | | | | | | | | 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: convert rpc.nfsd to use xlog()Jeff Layton2009-08-011-24/+43
| | | | | | | | | | | | | | | | | | ...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-011-0/+1
| | | | | | | | | | 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>
* 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>
* Allow rpc.nfsd to suppress tcp or udp, and listen on a specific address.Steve Dickson2006-07-031-3/+44
| | | | | | | | | | -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-261-8/+40
| | | | | | e.g. -N 2 means that NFSv2 won't be supported, just v3 and v4 (if the kernel supports them).
* Autogen updateneilbrown2005-12-201-1/+3
|
* Assorted changes from Steve Dicksonneilbrown2005-10-061-3/+1
|
* 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.
* 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-181-0/+68