summaryrefslogtreecommitdiffstats
path: root/support
Commit message (Collapse)AuthorAgeFilesLines
* export: Ensure that we free struct exportent->e_uuidTrond Myklebust2010-10-142-0/+3
| | | | | | | | | | | | | | | | | | Currently, the exportent->e_uuid is initialised in support/nfs/exports.c:parseopts(), but it is never freed. Also ensure that exportent->e_uuid is duplicated correctly in dupexportent(). Adjusted to account for the new export_free() helper. Also, e_uuid points to memory that is always allocated with strdup(3), not with xstrdup(). Thus it must be freed via free(3) and not via xfree(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libnfs.a: Allow multiple RPC listeners to share listener port numberChuck Lever2010-10-141-6/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, when "-p" is not specified on the mountd command line, the TI-RPC library chooses random port numbers for each listener. If a port number _is_ specified on the command line, all the listeners will get the same port number, so SO_REUSEADDR needs to be set on each socket. Thus we can't let TI-RPC create the listener sockets for us in this case; we must create them ourselves and then set SO_REUSEADDR (and other socket options) by hand. Different versions of the same RPC program have to share the same listener and SVCXPRT, so we have to cache xprts we create, and re-use them when additional requests for registration come from the application. Though it doesn't look like it, this fix was "copied" from the legacy rpc_init() function. It's more complicated for TI-RPC, of course, since a TI-RPC application can set up listeners with a nearly arbitrary number of address families and socket types, not just the two listeners that legacy RPC applications can set up (one for AF_INET UDP and one for AF_INET TCP). See: https://bugzilla.linux-nfs.org/show_bug.cgi?id=190 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix style nits in atomicio.cSteve Dickson2010-10-131-16/+6
| | | | | Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Move common code into supportSteve Dickson2010-10-135-1/+219
| | | | | | | | | | There are several source files and headers present in the ./utils/idmapd directory which are also usable in a doimapd daemon. Because of this we move that support into the support directory such that it can be shared by both daemons. Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix source code character encodingChuck Lever2010-09-272-2/+2
| | | | | | | | | | | | | Minor clean up. Most modern Linux distributions set UTF-8 locales. Standardize the character encoding of source files on UTF-8, to squelch vim com- plaints. I probably missed a few spots. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libnfs.a: Remove support/nfs/fstab.cSteve Dickson2010-09-271-554/+0
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Enable IPv6 support in hostname.cChuck Lever2010-09-161-16/+15
| | | | | | | | | | | | If --enable-ipv6 is specified when building nfs-utils, libexport's host_foo() helpers can now return both IPv4 and IPv6 addresses. This means IPv6 presentation addresses and IPv6 DNS resolution results are handled properly in the mountd cache and /etc/exports, but does not yet enable IPv6 mountd listeners. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libnfs.a: Fix API for getfh() & friendsChuck Lever2010-09-162-9/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more of a clean-up than a behavioral change. POSIX requires that a "struct sockaddr" is the same size as a "struct sockaddr_in". Therefore, a variable or field of type "struct sockaddr" cannot contain an AF_INET6 address. However, "struct sockaddr *" is often used to reference a generic (ie non-address family specific) socket address, generating some confusion about this. The nfsctl_arg struct uses a struct sockaddr (not a pointer) to pass the client's IP address to the kernel. This means the legacy nfsctl() kernel API can never support IPv6. Fortunately for us, this legacy interface was replaced by a text-based cache interface a few years back. We don't need to support non-AF_INET addresses here. The getfh() functions in nfs-utils provide a handy C API for the kernel's nfsctl interface. The getfh() functions still take a struct sockaddr *, though, and that can imply that a non-IPv4 address can be passed via this API. To make it abundantly clear that only IPv4 addresses can be used with this interface, change the synopses of getfh() and friends to take a struct sockaddr_in * instead of a struct sockaddr * . This makes these functions conform with other places in mountd and exportfs that already grok the difference between a struct sockaddr and a struct sockaddr_in. While we're here... Introduce some nice documenting comments for the get_fh() functions, and... Since mountd will support IPv6 in the near future, assert that the family of client addresses passed to this API is indeed AF_INET, in order to prevent non-AF_INET addresses from ever being passed to the legacy nfsctl() interface. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: Recognize "rdma" and "rdma6" netidChuck Lever2010-09-092-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | The mount.nfs command must recognize the values of "rdma" and "rdma6" with the "proto=" mount option. Typically the mount.nfs command relies on libtirpc or getprotobyname(3) to recognize netids and translate them to protocol numbers. RFCs 5665 and 5666 define the "rdma" and "rdma6" netids. IANA defines a specific port number for NFS over RDMA (20049), but has not provided a protocol name and number for RDMA transports, and is not expected to. The best we can do is translate these by hand, as needed, to get RDMA mount requests to the kernel without erroring out. Only the forward translation is needed until such time that "rdma" and "rdma6" start to appear in rpcbind registries. For now, the version and transport negotiation logic is skipped, avoiding rpcbind queries for RDMA mounts. Note: As of kernel 2.6.36, the kernel's NFS over RDMA transport capability does not support IPv6. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Refactor init_netmask()Chuck Lever2010-09-091-57/+106
| | | | | | | | | | | | | | | Instead of a single function that can handle both AF_INET and AF_INET6 addresses, two separate functions might be cleaner. The original plan was to keep code redundancy at a minimum, but the resulting code was cumbersome at best. I think I've traded a little extra code for something that will be much easier to read, understand, and maintain. I've also eliminated the "#if / #endif" instances inside the functions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: IPv6 support in client_check()Chuck Lever2010-08-311-22/+43
| | | | | | | | | Introduce support for IPv6 in client_check()'s helpers. The local addrs_match() twins are no longer needed since we can use nfs_compare_addrs() now. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: IPv6 support for client_init_subnet()Chuck Lever2010-08-311-0/+32
| | | | | | | | | | | | | | | To parse and store an IPv6 host or subnet address, init_netmask() needs to handle 128 bit subnet masks. Unfortunately what once was a pretty simple little function has grown much larger. This logic must now not only parse IPv6 addresses correctly, but must also distinguish between IPv4 and IPv6. To avoid code duplication, I'm "bending" the cardinal rule of not using "#ifdef" inside functions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Prepare init_subnetwork() for IPv6 supportChuck Lever2010-08-311-22/+59
| | | | | | | | | | | | | | | | Retire the slash32 logic in inet_netmask() in favor of a more generic netmask parser that can support IPv6 addresses. If an invalid IP address string is given to inet_addr(3), it returns INADDR_NONE, which is actually a "valid" address (255.255.255.255). We're none the wiser to the substitution until something breaks later. This patch provides better sanity checking of the parsed address, now that such an error can be reported to client_init()'s callers. We can also check the prefixlen value a little more carefully as well. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Use host helper to parse address in client_init()Chuck Lever2010-08-311-5/+8
| | | | | | | | | | Take the first step towards making it possible to parse either IPv4 or IPv6 addresses in client_init(). It won't handle IPv6 until host_pton() has IPv6 support enabled, and it still doesn't deal with IPv6 netmasks yet. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Prepare to recognize IPv6 addresses in client_gettype()Chuck Lever2010-08-311-9/+14
| | | | | | | | | | | | The current open-coded parsing logic in client_gettype() will be hard to modify to recognize IPv6 addresses. Use a more generic mechanism for detecting IP presentation addresses. IPv6 will be enabled automatically in client_gettype() when host_pton() is changed to support IPv6 addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport: Fix IP address check in check_netgroup()Chuck Lever2010-08-241-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | Neil Brown reports that recent changes to replace gethostby{addr,name}(3) with get{addr,info}name(3) may have inadvertently broken netgroup support. There used to be a gethostbyaddr(3) call in the third paragraph in check_netgroup(). The reason for that gethostbyaddr(3) call was that the first innetgr(3) call has already confirmed that hname is not a member of the netgroup. We also need to confirm that, if hname happens to be an IP address, the hostname bound to that IP address is not a member of the netgroup, either. Fix this by restoring appropriate address to hostname mapping of hname before retrying the innetgr(3) call. See http://marc.info/?l=linux-nfs&m=128084830214653&w=2 . Introduced by commit 0509d3428f523776ddd9d6e9fa318587d3ec7d84. Reviewed-by: Neil Brown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* bexport: Add a common exit label to check_netgroup()Chuck Lever2010-08-241-7/+16
| | | | | | | | | | check_netgroup() is going to be changed to free dynamically allocated resources before it returns, so a common exit point is needed. Reviewed-by: Neil Brown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove warnings from nfsctl.cSteve Dickson2010-08-091-1/+1
| | | | | | | nfsctl.c: In function 'expsetup': nfsctl.c:112: warning: signed and unsigned type in conditional expression Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from network.cSteve Dickson2010-08-091-0/+3
| | | | | | | network.c: In function 'nfs_verify_family': network.c:1366: warning: unused parameter 'family' Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from cache.cSteve Dickson2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | cache.c:812: warning: missing initializer cache.c:812: warning: (near initialization for 'cachelist[0].f') cache.c:813: warning: missing initializer cache.c:813: warning: (near initialization for 'cachelist[1].f') cache.c:814: warning: missing initializer cache.c:814: warning: (near initialization for 'cachelist[2].f') cache.c:815: warning: missing initializer cache.c:815: warning: (near initialization for 'cachelist[3].f') cache.c:816: warning: missing initializer cache.c:816: warning: (near initialization for 'cachelist[4].f') cache.c: In function 'cache_export_ent': cache.c:887: warning: comparison between signed and unsigned integer expressions cache.c:907: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from conffile.cSteve Dickson2010-08-091-4/+4
| | | | | | | | | | conffile.c: In function 'conf_parse_line': conffile.c:301: warning: comparison between signed and unsigned integer expressions conffile.c: In function 'conf_load_defaults': conffile.c:356: warning: unused parameter 'tr' Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove warnings from nfs_mntent.cSteve Dickson2010-08-091-1/+1
| | | | | | | nfs_mntent.c: In function 'mangle': nfs_mntent.c:36: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson <steved@redhat.com>
* emove warnings from cacheio.cSteve Dickson2010-08-091-1/+1
| | | | | | | cacheio.c: In function 'cache_flush': cacheio.c:352: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove warnings from svc_socket.cSteve Dickson2010-08-093-5/+5
| | | | | | | svc_socket.c: In function 'svcudp_socket': svc_socket.c:160: warning: unused parameter 'reuse' Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from rpcdispatch.cSteve Dickson2010-08-091-2/+2
| | | | | | | | | | rpcdispatch.c: In function 'rpc_dispatch': rpcdispatch.c:30: warning: comparison between signed and unsigned integer expressions rpcdispatch.c:35: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix C aliasing rules violation in nfs_getrpccaller()Chuck Lever2010-07-191-2/+2
| | | | | | | | | | | | | | | Squelch compiler warnings reported with -Wextra: In file included from statd.c:24: ../../support/include/rpcmisc.h: In function nfs_getrpccaller_in: ../../support/include/rpcmisc.h:58: warning: dereferencing type-punned pointer might break strict-aliasing rules ../../support/include/rpcmisc.h: In function nfs_getrpccaller: ../../support/include/rpcmisc.h:63: warning: dereferencing type-punned pointer might break strict-aliasing rules Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Remove unused hostent-based DNS helper functionsChuck Lever2010-06-222-310/+16
| | | | | | | | | | | Clean up: Get rid of hostent-based DNS helper functions in libexport.a that have been replaced by addrinfo-based DNS helpers. None of the original code remains, so replace the copyright notice as well. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Replace matchhostname()Chuck Lever2010-06-221-2/+0
| | | | | | | | | | | | | | | | | So that exportfs can eventually support IPv6 addresses, copy statd's getaddrinfo(3)-based matchhostname to exportfs, with adjustments for dealing with export wildcards and netgroups. Until exportfs has full IPv6 support, however, we want to ensure that IPv6 addresses continue to remain blocked in the address comparison code used by exportfs. At a later point we'll replace much of this with the generic functions in sockaddr.h. Since it contains special logic for handling wildcard and netgroups, this function is specialized for exportfs, and does not belong in one of the shared libraries. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Add documenting commentsChuck Lever2010-06-222-9/+39
| | | | | | | | Clean up. Add a few additional documenting comments for globally visible functions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Make export_add() staticChuck Lever2010-06-222-5/+2
| | | | | | | | Clean up: export_add() is not called from outside of export.c, so make it a static helper. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Make export_read() return voidChuck Lever2010-06-222-3/+7
| | | | | | | | Clean up: export_read()'s return value is always zero, and its only caller never checks it. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Replace "struct hostent" with "struct addrinfo"Chuck Lever2010-06-224-138/+181
| | | | | | | | | | | | | | | | | | | struct hostent can store either IPv4 or IPv6 addresses, but it can't store both address families concurrently for the same host. Neither can hostent deal with parts of socket addresses that are outside of the sin{,6}_addr field. Replace the use of "struct hostent" everywhere in libexport.a, mountd, and exportfs with "struct addrinfo". This is a large change, but there are so many strong dependencies on struct hostent that this can't easily be broken into smaller pieces. One benefit of this change is that hostent_dup() is no longer required, since the results of getaddrinfo(3) are already dynamically allocated. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Add helpers to manage DNS lookupsChuck Lever2010-06-223-1/+365
| | | | | | | | | | | | | | | Introduce DNS query helpers based on getaddrinfo(3) and getnameinfo(3). These will eventually replace the existing hostent-based functions in support/export/hostname.c. Put some of these new helpers to immediate use, where convenient. As they are part of libexport.a, I've added the forward declarations for these new functions in exportfs.h rather than misc.h, where the hostent-based forward declarations are currently. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Convert colons in IPv6 presentation addresses tosemicolonsChuck Lever2010-05-241-3/+39
| | | | | | | | | | | | | | The /var/lib/nfs/rmtab file delineates fields in each of its lines with a ":". The first field contains the IP address of a client, in presentation format. IPv6 presentation format addresses contain colons, which screws up the field delineation of rmtab. Use a simple simple scheme to convert the colons in incoming client names to some other character, and then convert them back when the rmtab file is read. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Refactor rmtab_read()Chuck Lever2010-05-241-23/+41
| | | | | | | | Clean up: Make it easier to add IPv6 support by refactoring part of rmtab_read() into a helper function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd/exportfs: Make m_addrlist field a nfs_sockaddrChuck Lever2010-05-053-15/+90
| | | | | | | | | | | | | | | | | | | | | | | | To store non-AF_INET addresses in the nfs_client structure, we need to use more than in_addr for the m_addrlist field. Make m_addrlist larger, then add a few helper functions to handle type casting and array indexing cleanly. We could treat the nfs_client address list as if all the addresses in the list were the same family. This might work for MCL_SUBNETWORK type nfs_clients. However, during the transition to IPv6, most hosts will have at least one IPv4 and one IPv6 address. For MCL_FQDN, I think we need to have the ability to store addresses from both families in one nfs_client. Additionally, IPv6 scope IDs are not part of struct sin6_addr. To support link-local IPv6 addresses and the like, a scope ID must be stored. Thus, each slot in the address list needs to be capable of storing an entire socket address, and not simply the network address part. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Clean up client_add()Chuck Lever2010-05-052-15/+12
| | | | | | | | | | | Clean up: client_add()'s current callers never set unknown m_type values, so the m_type check is unnecessary. All of client_add()'s callers are in the same source file where it is defined, so make it a static helper function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Refactor client_init()Chuck Lever2010-05-051-43/+56
| | | | | | | | | | Clean up: Move subnet hostname parsing logic out of client_init() to make it simpler to introduce IPv6 support. Make client_init() a helper, since it's already static. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Make capabilities support optionalMike Frysinger2010-04-231-0/+4
| | | | | | | | | | The new code using libcap is quite minor, so rather than always reqiure libcap support, make it a normal --enable type flag. Current default behavior is retained -- if libcap is found, it is enabled, else it is disabled like every nfs-utils version in the past. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Allow malloc(3) failures in client_lookup() and friendsChuck Lever2010-04-231-6/+9
| | | | | | | | | | | | | Clean up: Use malloc(3) instead of xmalloc() in client_lookup() and client_dup(), ensuring that a failed memory allocation here doesn't cause our process to exit suddenly. Allocation of nfs_client records and the m_hostname string are now consistently handled with malloc(3), calloc(3), strdup(3), and free(3). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Allow m_hostname allocation to fail instead of exitChuck Lever2010-04-231-6/+4
| | | | | | | | | | | | Clean up: Replace xstrdup() with strdup(3) in client_init(), to prevent the process from exiting if the memory allocation fails. Note that both of client_init()'s callers set m_hostname equal to NULL before calling, thus the extra free(3) at the top of client_init() is unneeded. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Allow client_init() to fail instead of exitChuck Lever2010-04-231-7/+17
| | | | | | | | | client_init()'s current callers can now deal correctly with a failure. Get rid of code that can cause our process to exit in client_init(), if address mask parsing or memory allocation fails. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Add client_free()Chuck Lever2010-04-231-2/+8
| | | | | | | Clean up: Introduce a helper to free a nfs_client record. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: export_find() should handle address parsing errorsChuck Lever2010-04-161-0/+4
| | | | | | | | | | | | | | | An address mask parsing error can cause client_init(), and therefore client_dup(), to make our process exit suddenly. Soon we want to add more complex address parsing in client_init(), so we need this interface to be a little more robust. Since export_find() can return NULL in some cases, it can handle NULL returns from its subroutines if an address parsing error occurs, or if memory is exhausted. Allow for client_dup() to return NULL instead of exiting sideways. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Add export_free()Chuck Lever2010-04-161-10/+17
| | | | | | | Clean up: Introduce a helper to free an nfs_export record. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Add helper for populating m_addrlist[]Chuck Lever2010-04-151-18/+20
| | | | | | | | | Clean up: Move common code that populates an nfs_client record's m_addrlist to a helper function. This eliminates a little code duplication, and makes it simpler to add IPv6 support later. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Reduce code duplication in client_init()Chuck Lever2010-04-151-4/+5
| | | | | | | | | Clean up: Most cases in client_init() set clp->m_naddr to zero. Move it to the common part of the function, and simplify the logic. This will make adding IPv6 support here more straightforward. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: replace xlog(L_FATAL) in client_check()Chuck Lever2010-04-081-4/+9
| | | | | | | | | | | Clean up: Prevent the process from exiting in client_check(). Report bad m_type values, but return 0. This removes another site where a mountd or exportfs process can exit sideways. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Refactor wildcard checking in client_check()Chuck Lever2010-04-081-12/+26
| | | | | | | | | | Clean up: refactor wildcard logic out of client_check() to make it easier to introduce IPv6 support. Match the style used for client_check_{fqdn,subnetwork,netgroup}. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Refactor netgroup checking in client_check()Chuck Lever2010-04-081-40/+57
| | | | | | | | | | | | | | | | | | Clean up: refactor netgroup logic out of client_check() to make it easier to introduce IPv6 support. + Use preferred style of keeping #ifdef out of the middle of function definitions. Squelch compiler warnings for "#ifndef HAVE_INNETGR" by using __attribute__((unused)). + Use preferred style of not using curly braces around switch cases. + Match style used for check_{fqdn,subnetwork}. + Clarify comment documenting use of h_aliases Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>