summaryrefslogtreecommitdiffstats
path: root/support/nfs
Commit message (Collapse)AuthorAgeFilesLines
...
* Now that only the Section names are case-insensitiveSteve Dickson2009-08-161-12/+0
| | | | | | | | | the mount code has to make sure the the mount options given to the kernel are in the correct case. Fixed a couple of warnings on #ifndefs Signed-off-by: Steve Dickson <steved@redhat.com>
* Added an conditional argument to the Section namesSteve Dickson2009-08-161-18/+96
| | | | | | | | | | | | | | with the format being: [ Section <"argument"> ] This will help group similar functioning Section together. The argument is conditional but must be surrounded by the '"' characters. The new conf_get_section() interface can used to locate a Section by its Section name and/or argument. Signed-off-by: Steve Dickson <steved@redhat.com>
* Make Section names case-insensitive which shouldSteve Dickson2009-08-161-0/+15
| | | | | | | help in locating them resulting in make the config files a bit less error prone Signed-off-by: Steve Dickson <steved@redhat.com>
* Taught conf_parse_line() to ignore spaces in theSteve Dickson2009-08-161-9/+26
| | | | | | '[section]' parsing and before the assignment statements Signed-off-by: Steve Dickson <steved@redhat.com>
* Move idmapd's configuration file parsing routines intoSteve Dickson2009-08-162-1/+851
| | | | | | | the shared libnfs.a library, making them available to\ other daemons and programs. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: move nfssvc.c to nfsd dir and clean up linking of nfsdJeff Layton2009-08-012-188/+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>
* errno not be set on RPC errorsSteve Dickson2009-07-151-1/+5
| | | | | | | | | | | | Changed both nfs_advise_umount() and nfs_gp_ping() to set the errno by calling CLNT_GETERR() after a CLNT_CALL() error. Also added code to rpc_strerror() that will log the errno value, when set, via strerror(). These changes added essential information to the error message making it much easier to detect errorsuch as "Connection refused" Signed-off-by: Steve Dickson <steved@redhat.com>
* support: Introduce sockaddr helpers to get and set IP port numbersChuck Lever2009-07-142-39/+48
| | | | | | | | | | Introduce address family-agnostic functions that get and set IP port numbers in socket addresses. We can already replace a few similar functions in the mount command, and a few more will come up with statd and sm-notify. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: Convert TCP connection refused to RPC_CANTRECVChuck Lever2009-07-141-0/+3
| | | | | | | | | | | | | In a similar vein to the timeout logic we just restored, a refused TCP connection should be mapped to an equivalent UDP error code: RPC_CANTRECV. This is new behavior for TCP connections; the legacy mount command appears to have simply failed immediately if a TCP connection was refused during an rpcbind query. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: Restore historical TCP connect timeout error codeChuck Lever2009-07-141-2/+24
| | | | | | | | | | | | | | | | | The latest versions of mount.nfs appear not to fall back to UDP if TCP isn't available on the server. Our new nfs_getport() implementation is missing a bit of logic from the original mount getport() implementation. Without it, nfs_probe_port() sees a TCP connect timeout as a permanent error, so it fails immediately instead of attempting to try again with UDP. Similar changes for our new ping API (see the old clnt_ping() function, which is still in utils/mount/network.c). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: Clear shared error fields before trying rpcbind queriesChuck Lever2009-07-142-0/+22
| | | | | | | | | Some RPC errors set fields in rpc_createerr.cf_error in addition to cf_stat. Be sure to clear _all_ error fields in rpc_createerr each time through the rpcbind API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: RPC_PROGNOTREGISTERED is a permanent errorChuck Lever2009-07-141-1/+1
| | | | | | | | | | | | | | | rpcbind returns RPC_PROGNOTREGISTERED if it knows for certain that an RPC program is not supported for a given transport. This is a permanent and authoritative error, so the library's rpcbind query API should never retry the query -- it will only get the same answer. A similar change was submitted for libtirpc. Unlike rpcb_getaddr(3t), mount.nfs's rpcbind client only retries once (with RPCB3PROC_GETADDR), but an extra TCP socket in this case would leave another port in TIME_WAIT. It's infrequent enough, but might as well get rid of it. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* support: Set proper retransmit timeout for datagram transportsChuck Lever2009-07-141-1/+3
| | | | | | | | | Instead of setting the total timeout and the retransmit timeout to the same value for datagram transports, use a 1 second retransmit timeout, so we actually get a retransmit or two before failing. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* support: Don't return RPC_UNKNOWNHOST from rpc_socket.cChuck Lever2009-07-141-2/+2
| | | | | | | | | | RPC_UNKNOWNHOST means a hostname isn't known -- basically it's EAI_NONAME from getaddrinfo(3). Since the functions in rpc_socket.c don't take a hostname argument, RPC_UNKNOWNHOST is not an appropriate return code from these functions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* support: Use HAVE_LIBTIRPC to switch in bindresvport_sa(3t)Chuck Lever2009-07-141-3/+3
| | | | | | | | | | | commit 383a026d99624c88c0e802103ef4c4865db8eb71, which fixed an earlier commit, is still not quite correct. bindresvport_sa(3t) is available whenever libtirpc is linked. There's no need to use IPV6_SUPPORTED here. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: Remove unneeded @salen argumentsChuck Lever2009-07-141-25/+17
| | | | | | | | Clean up: Now that getnameinfo(3) is no longer used, the @salen argument to nfs_sockaddr2universal() is no longer needed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: replace getnameinfo(NI_NUMERICHOST) with inet_ntop(3)Chuck Lever2009-07-141-47/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getnameinfo(3) with the NI_NUMERICHOST flag is used in support/nfs/getport.c to convert socket addresses to universal address strings. Older versions of glibc do not have getnameinfo(3), however. In order for nfs-utils to build on older systems we switch in legacy code via HAVE_GETNAMEINFO and use inet_ntoa(3). A problem with this is that we have to double our test matrix to be sure that both versions of these routines build and operate correctly. Another minor problem is that inet_ntoa(3) is officially deprecated. So let's always use a single implementation based on inet_ntop(3). Universal address strings do not support link-local / scope IDs, so we don't lose any functionality by using inet_ntop(3) here. This means we open code a bit of logic that is available in most modern versions of glibc, but in return we can use exactly the same code for all builds (on systems with getnameinfo(3) and without). An additional benefit is we can avoid using NI_MAXHOST for character buffers that live on the stack: it's 1025 bytes. Instead, INET6_ADDRSTRLEN is used, which is just 46 bytes, plus an additional eight bytes for the port information. We add beefier buffer overflow detection logic as well. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: Remove AI_ADDRCONFIG from nfs_gp_loopback_address()Chuck Lever2009-07-141-44/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | AI_ADDRCONFIG was used ostensibly to figure out if the local system had IPv6 available when generating a loopback address. A legacy version of nfs_gp_loopback_address() was created to handle ANYADDR address generation for old versions of glibc where AI_ADDRCONFIG doesn't exist. This means we have to be careful to test both the normal and legacy versions when committing changes in this area. But it turns out that even contemporary versions of glibc ignore AI_ADDRCONFIG when the hostname string is NULL. getaddrinfo(3) always returns an AF_INET and an AF_INET6 loopback address in this case, no matter how the system is configured. Change nfs_gp_loopback_address() to have one version that simply looks up "localhost" instead of doing anything fancy. If "localhost" is an IPv6 address, we'll use that. Otherwise, it should nearly always be an AF_INET loopback address. This eliminates the need for AI_ADDRCONFIG, and removes the duplicate version of nfs_gp_loopback_address(). Note that callers never used the port number in the returned socket address, so get rid of the "sunrpc" service string too. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: RPCB_GETADDR's r_addr should contain rpcbind port, not zeroChuck Lever2009-07-141-14/+23
| | | | | | | | | | | Similar to a change made to the kernel's rpcbind client. See kernel commit 143b6c4008a7928de7e139c3a77a90e4cad8db2c. The r_addr argument of RPCB_GETADDR procedures contains the rpcbind server's address and port number. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport: RPCB_GETADDR r_owner should be an empty stringChuck Lever2009-07-141-5/+1
| | | | | | | | | | | Some servers reject RPCB_GETADDR requests with a non-empty r_owner field. "RPC: Server can't decode arguments" An empty string is already used by libtirpc and the kernel for RPCB_GETADDR requests. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The closeall function is broken in such a way that it almost neverSteve Dickson2009-06-221-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | closes any file descriptors. It's calling strtol on the text representation of the file descriptor, and then checking to see if the value of *endptr is not '\0' before trying to close the file. This check is wrong. When strtol returns an endptr that points to a NULL byte, that indicates that the conversion was completely successful. I believe this check should instead be requiring that endptr is pointing to '\0' before closing the fd. Also, fix up the function to check for conversion errors from strtol. If one occurs, just skip the close on that entry. Finally, as Trond pointed out, it's unlikely that readdir will return a blank string in d_name but that situation wouldn't be detected by the current code. This patch adds such a check and skips the close if it occurs. Reported-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix IPv6 support in support/nfs/rpc_socket.cChuck Lever2009-05-181-7/+5
| | | | | | | | | | | Use the correct #ifdef variable to enable IPv6 support for privileged RPC clients. Without this fix, unmounting an IPv6 NFSv2/v3 server fails. Introduced by commit 8c94296bc84f3a204f2061c0391a1d2350e4f37e. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* utils/nfsd: add support for minorvers4Benny Halevy2009-05-041-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* support: Provide an API for creating a privileged RPC clientChuck Lever2009-04-181-7/+133
| | | | | | | | | | | | | | We needed to guarantee that some RPC programs, such as PMAP, got an unprivileged port, to prevent exhausting the local privileged port space sending RPC requests that don't need such privileges. nfs_get_rpcclient() provides that feature. However, some RPC programs, such as MNT and UMNT, require a privileged port. So, let's provide an additional API for this that also supports IPv6 and setting a destination port. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* getport.c: fix non-standard CChuck Lever2009-04-151-2/+2
| | | | | | | | | Squelch a compiler warning in getport.c: getport.c:65: warning: ¿static¿ is not at beginning of declaration Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* cacheio: return any original error from qword_eolKevin Coffman2009-04-031-2/+8
| | | | | | | | | If the initial fflush() fails in qword_eol, log the failure and return the indication of the original failure, not the successful cover-up. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Mountd should use separate lockfilesBen Myers2009-04-031-5/+7
| | | | | | | | | | | | | | | | Mountd keeps file descriptors used for locks separate from those used for io and seems to assume that the lock will only be released on close of the file descriptor that was used with fcntl. Actually the lock is released when any file descriptor for that file is closed. When setexportent() is called after xflock() he closes and reopens the io file descriptor and defeats the lock. This patch fixes that by using a separate file for locking, cleaning them up when finished. Signed-off-by: Ben Myers <bpm@sgi.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* In recent Fedora builds, the '-D _FORTIFY_SOURCE=2' compileSteve Dickson2009-03-231-3/+13
| | | | | | | | flag has been set. This cause warnings to be generated when return values from reads/writes (and other calls) are not checked. The patch address those warnings. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Include legacy or TI-RPC headers, not bothChuck Lever2009-03-162-45/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Data type incompatibilities between the legacy RPC headers and the TI-RPC headers mean we can't use libtirpc with code that was compiled against the legacy RPC headers. The definition of rpcprog_t for example is "unsigned long" in the legacy library, but it's "uint32_t" for TI-RPC. On 32-bit systems, these types happen to have the same width, but on 64-bit systems they don't, making more complex data structures that use these types in fields ABI incompatible. Adopt a new strategy to deal with this issue. When --enable-tirpc is set, append "-I/usr/include/tirpc" to the compilation steps. This should cause the compiler to grab the tirpc/ headers instead of the legacy headers. Now, for TI-RPC builds, the TI-RPC legacy functions and the TI-RPC headers will be used. On legacy systems, the legacy headers and legacy glibc RPC implementation will be used. A new ./configure option is introduced to allow system integrators to use TI-RPC headers in some other location than /usr/include/tirpc. /usr/include/tirpc remains the default setting for this new option. The gssd implementation presents a few challenges, but it turns out the gssglue library is similar to the auth_gss pieces of TI-RPC. To avoid similar header incompatibility issues, gssd now uses libtirpc instead of libgssglue if --enable-tirpc is specified. There may be other issues to tackle with gssd, but for now, we just make sure it builds with --enable-tirpc. Note also: svc_getcaller() is a macro in both cases that points to a sockaddr field in the svc_req structure. The legacy version points to a sockaddr_in type field, but the TI-RPC version points to a sockaddr_in6 type field. rpc.mountd unconditionally casts the result of svc_getcaller() to a sockaddr_in *. This should be OK for TI-RPC as well, since rpc.mountd still uses legacy RPC calls (provided by glibc, or emulated by TI-RPC) to set up its listeners, and therefore rpc.mountd callers will always be from AF_INET addresses for now. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: replace function-specific switches with HAVE_LIBTIRPCChuck Lever2009-03-162-43/+43
| | | | | | | | | | | | | Instead of switching in TI-RPC-specific logic with a function-specific switch like HAVE_CLNT_VG_CREATE, let's use the more generic HAVE_LIBTIRPC macro everywhere. This simplifies ./configure (always a good thing), and makes it more clear in the source code exactly what the extra conditionally compiled code is for. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Replace getservbyname(3)Chuck Lever2009-03-052-88/+63
| | | | | | | | | The getservbyname(3) function is not re-entrant, and anyway, the man page says it is obsolete. Replace it with a call to getaddrinfo(3). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Have sizeof using the correct value in nfs_getlocalport()Ben Greear2009-03-041-1/+1
| | | | | Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Remove fprintf() call from support/nfs/getport.cChuck Lever2009-03-041-3/+0
| | | | | | | | getport.c is effectively a library, so it should not be emitting messages via printf. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: getport: don't use getaddrinfo(3) on old systemsChuck Lever2009-01-061-10/+59
| | | | | | | | | Older glibc versions have a getaddrinfo(3) that doesn't support AI_ADDRCONFIG. Detect that case and build something else for getport.c that will work adequately on those systems. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Added support/nfs/getport.cSteve Dickson2008-11-181-0/+965
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Introduce rpcbind client utility functionsChuck Lever2008-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that at least the mount command and the showmount command need to query a server's rpcbind daemon. They need to query over AF_INET6 as well as AF_INET. libtirpc provides an rpcbind query capability with the rpcb_getaddr(3) interface, but it takes a hostname and netconfig entry rather than a sockaddr and a protocol type, and always uses a lengthy timeout. The former is important to the mount command because it sometimes must operate using a specific port and IP address rather than depending on rpcbind and DNS to convert a [hostname, RPC program, netconfig] tuple to a [socket address, port number, transport protocol] tuple. The rpcb_getaddr(3) API also always uses a privileged port (at least for setuid root executables like mount.nfs), which is not required for an rpcbind query. This can exhaust the local system's reserved port space quickly. This patch provides a reserved-port-friendly AF_INET6-capable rpcbind query C API that can be shared among commands and tools in nfs-utils, and allows a query to a specified socket address and port rather than a hostname. In addition to an rpcbind query interface, this patch also provides a facility to ping the remote RPC service to ensure that it is operating as advertised by rpcbind. It's useful to combine an RPC ping with an rpcbind query because in many cases, components of nfs-utils already ping an RPC service immediately after receiving a successful GETPORT result. There are also a handful of utility routines provided, such as a functions that can map between [sockaddr, port] and a universal address. I've made an attempt to make these new functions build and operate on systems that do not have libtirpc. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add AF_INET6-capable API to acquire an RPC CLIENT *Chuck Lever2008-11-172-1/+529
| | | | | | | | | | | | Provide a simple interface that any component of nfs-utils can use to acquire an RPC CLIENT *. This is an AF_INET6-enabled API, and can also handle PF_LOCAL sockets if libtirpc is present on the system. When libtirpc is not available, legacy RPC services will be used instead, and an attempt to connect to an AF_INET6 address will fail. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: make makesock() staticChuck Lever2008-10-081-42/+40
| | | | | | | | | | | | | | | | | | Clean up: The makesock() function can become static since it is only used in rpcmisc.c, where it is defined. Fix some minor nits while we're in the area: o Move it so we can remove it's forward declaration. o Get rid of unneeded newlines in the xlog() format strings. o Use htonl(INADDR_ANY) instead of INADDR_ANY to initialize sin_addr. Should make no run-time difference, but is slightly more proper, as the standard definition of INADDR_ANY is in host byte-order. o Remove the parentheses in the "return" statements. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Clean up support/nfs/rpcmisc.c:closedown()Chuck Lever2008-10-081-23/+25
| | | | | | | | Clean up: update closedown()'s synopsis to modern C style, and move the function so we can remove the forward declaration. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: whitespace clean ups in support/nfs/rpcmisc.cChuck Lever2008-09-261-7/+6
| | | | | | | Clean up: fix a few spurious white space issues in support/nfs/rpcmisc.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Remove excess log reportingChuck Lever2008-09-261-8/+4
| | | | | | | | | Clean up: The makesock() function already reports an error if it can't create a socket. Remove the redundant error check and logging done in rpc_init() after a makesock() call. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: make makesock() staticChuck Lever2008-09-261-16/+22
| | | | | | | | | | | | | | | | | | Clean up: The makesock() function can become static since it is only used in rpcmisc.c, where it is defined. Fix some minor nits while we're in the area: o Move it so we can remove it's forward declaration. o Get rid of unneeded newlines in the xlog() format strings. o Use htonl(INADDR_ANY) instead of INADDR_ANY to initialize sin_addr. Should make no run-time difference, but is slightly more proper, as the standard definition of INADDR_ANY is in host byte-order. o Remove the parentheses in the "return" statements. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: remove disabled code from support/nfs/rpcmisc.cChuck Lever2008-09-261-16/+0
| | | | | | | | | After some recent discussions, we want to rely on the kernel's network layer to autotune socket buffers. Since this code is already disabled in support/nfs/rpcmisc.c (and has been for some time), let's just remove it. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Remove unused function rpc_svcrun()Chuck Lever2008-09-261-51/+0
| | | | | | | | Clean up: remove function that has been disabled (via #if 0) for almost a decade. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: remove unused function rpc_logcall()Chuck Lever2008-09-261-60/+0
| | | | | | | Clean up: Eliminate rpc_logcall(), which has no callers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove redundant m_path fieldJ. Bruce Fields2008-08-281-6/+0
| | | | | | | | | | | | | | | | | Contrary to the comment above its definition, the field m_path always has the same value as e_path: the *only* modifications of m_path are all of the form: strncpy(exp->m_export.m_path, exp->m_export.e_path, sizeof (exp->m_export.m_path) - 1); exp->m_export.m_path[sizeof (exp->m_export.m_path) - 1] = '\0'; So m_path is always just a copy of e_path. In places where we need to store a path to a submount of a CROSSMNT-exported filesystem, as in cache.c, we just use a local variable. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix handling of explicit uuidDavid Woodhouse2008-08-281-1/+1
| | | | | | | | | | | Fix a couple of bugs which show up if you try to explicitly set a 16-byte UUID when exporting a file system. First, exportfs cuts the first two bytes off the UUID and writes something invalid to etab. Second, mountd writes the _ascii_ form of the UUID to the kernel, instead of converting it to hex. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* It appears that a recent glibc update now enforces the requirement for a modeSteve Dickson2008-07-151-1/+7
| | | | | | | | | | parameter for open calls with the O_CREAT flag set. nfs-utils support code defines a function xflock used by exportfs and mountd that calls open with O_CREAT but no mode parameter. This causes exportfs and mountd to dump core, with the error message: *** invalid open64 call: O_CREAT without mode ***:rpc.mountd terminated Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed the initialization of args2 in xlog_backend. ItSteve Dickson2008-06-061-1/+1
| | | | | | caused a compilation error on x86_64 archs. Signed-off-by: Steve Dickson <steved@redhat.com>
* Cleaned up warnings in rmtab.c and xlog.cSteve Dickson2008-06-061-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>