summaryrefslogtreecommitdiffstats
path: root/support
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-143-0/+31
| | | | | | | | | 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-142-28/+18
| | | | | | | | 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>
* Replace the Sun RPC license with the BSD license,Tom spot Callaway2009-06-022-50/+46
| | | | | | | with the explicit permission of Sun Microsystems Signed-off-by: Tom "spot" Callaway <tcallawa@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-043-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Host aliases need to be checked when netgroups is used in exports.Steve Dickson2009-04-291-1/+7
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* support: Provide an API for creating a privileged RPC clientChuck Lever2009-04-182-8/+143
| | | | | | | | | | | | | | 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-034-17/+30
| | | | | | | | | | | | | | | | 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>
* Added back the some logging variables which are noSteve Dickson2009-03-081-1/+9
| | | | | | | | | longer used but, unfortunately, they are extern-ed by public headers files which are not under the control of this package. Spotted-by: Juergen Daubert <jue@jue.li> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Provide type-checked version of svc_getcaller()Chuck Lever2009-03-051-0/+9
| | | | | | | | | | | | | TI-RPC's version of the svc_getcaller() macro points to a sockaddr_in6, not a sockaddr_in, though for AF_INET callers, an AF_INET address resides there. To squelch compiler warnings when the TI-RPC version of the svc_req structure is used, add inline helpers with appropriate type casting. Note that tcp_wrappers support only 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 getservbyname(3)Chuck Lever2009-03-053-94/+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>
* General clean up. Removed unused routines. Reworked syslogSteve Dickson2009-03-041-130/+5
| | | | | | | | message to (hopefully) make it more sensible. Move "#ifdef HAVE_LIBWRAP" around so nothing will be defined when tcp wrapper is not configured. Signed-off-by: Steve Dickson <steved@redhat.com>
* Converted good_client() to correctly use the tcp wrapperSteve Dickson2009-03-041-50/+7
| | | | | | | interface and added a note to the mountd man page saying hostnames will be ignored when they can not be looked up. Signed-off-by: Steve Dickson <steved@redhat.com>
* Only hash on IP address and Program number. Including the ProcedureSteve Dickson2009-03-041-12/+11
| | | | | | number only creates needles extra hash entries. Signed-off-by: Steve Dickson <steved@redhat.com>
* Exportfs and rpc.mountd optimalizationTomas Richter2009-02-184-31/+104
| | | | | | | | | | | | | | | | | | | | | | | | There were some problems with exportfs and rpc.mountd for long export lists - see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76643 I do optimalization as my bachelors thesis (Facuulty of informatics, Masaryk's university Brno, Czech Republic), under lead of Yenya Kasprzak. Both exportfs and rpc.mount build linked list of exports (shared functions in export.c). Every time they are inserting new export into list, they search for same export in list. I replaced linked list by hash table and functions export_add and export_lookup by functions hash_export_add and hash_export_lookup (export.c). Because some other functions required exportlist as linked list, hash table has some implementation modification im comparison with ordinary hash table. It also keeps exports in linked list and has pointer to head of the list. So there's no need of implementation function <for_all_in_hash_table>. Signed-off-by: Tomas Richter <krik3t@gmail.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>
* Now that the TCP wrapper actually works, mounts willSteve Dickson2009-01-031-4/+16
| | | | | | | | be denied with misconfigured DNS configurations. Warnings will be logged when these types of configurations are detected. Signed-off-by: Steve Dickson <steved@redhat.com>
* To ensure the hash table of clients has validSteve Dickson2008-12-191-3/+42
| | | | | | | | | access rights, check the modification times on both access files. If one of them have change, update the hash entry instead of creating a new entry. Signed-off-by: Steve Dickson <steved@redhat.com>
* Clients IP address and host names are check onSteve Dickson2008-12-191-0/+79
| | | | | | | | | | every RPC request, to both mountd and statd when TCP wrappers are enabled. To help this process scale better the access rights are stored in a hash table, which are hashed per IP address, RPC program and procudure numbers. Signed-off-by: Steve Dickson <steved@redhat.com>
* When clients are define as IP addresses in /etc/hosts.deny,Steve Dickson2008-12-191-44/+45
| | | | | | | | access is allow due to misinterpreting the return value of hosts_ctl(). This patch reworks that logic which closes that hole. 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-172-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-173-1/+599
| | | | | | | | | | | | 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-262-17/+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-262-52/+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-262-61/+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-284-25/+2
| | | | | | | | | | | | | | | | | 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>