summaryrefslogtreecommitdiffstats
path: root/utils/showmount
Commit message (Collapse)AuthorAgeFilesLines
* autoconf: only link binaries that need it to libtirpcJeff Layton2012-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* nfs-utils: add and use nfs_authsys_createJeff Layton2010-03-011-1/+7
| | | | | | | | | | | | | | | | | | The current mount, umount and showmount code uses authunix_create_default to get an auth handle. The one provided by glibc returned a truncated list of groups when there were more than 16 groups. libtirpc however currently does an abort() in this case, which causes the program to crash and dump core. nfs-utils just uses these auth handles for the MNT protocol, so the group list doesn't make a lot of difference here. Add a new function that creates an auth handle with a supplemental gids list that consists only of the primary gid. Have nfs-utils use that function anywhere that it currently uses authunix_create_default. Also, have the caller properly check for a NULL return from that function. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount: Try the highest mount version then fall back to lower onesSteve Dickson2010-01-111-7/+30
| | | | | | | | | | Showmount should try the highest mount version first then fall back to the lower ones when the server returns a RPC_PROGVERSMISMATCH error. The idea being not using the lower mount versions will begin the process of moving away from NFSv2 support. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: remove legacy RPC logicChuck Lever2009-03-041-141/+0
| | | | | | | | | Turns out both legacy RPC and TI-RPC have a clnt_create(3) API. So there's really no need to keep the old open-coded transport logic around. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: Quiesce warning when TI-RPC is disabledChuck Lever2009-01-071-7/+7
| | | | | | | | | | Make sure nfs_sm_pgmtbl is not compiled if TI-RPC functions are not available. This quiesces the following compiler warning: showmount.c:53: warning: nfs_sm_pgmtbl defined but not used Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: support querying IPv6 serversChuck Lever2008-11-251-0/+36
| | | | | | | | | | Introduce a version of nfs_get_mount_client() that supports AF_INET6 and AF_INET server addresses. If the TI-RPC library is not available when the showmount command is built, fall back to the legacy RPC user-space API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: move logic to acquire RPC client handle out of main()Chuck Lever2008-11-251-52/+64
| | | | | | | | | | In preparation to support IPv6 in the showmount command, extract the logic that parses/acquires the target hostname and converts it into an RPC client handle to contact the remote mountd service, and move it into its own function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: Remove unused local getport() implementationChuck Lever2008-11-251-105/+0
| | | | | | | | Clean up: remove showmount.c's local getport() implementation, now that the showmount command uses the shared one. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: call nfs_getport instead of local getportChuck Lever2008-11-251-6/+8
| | | | | | | | | | Have the showmount command invoke the shared nfs_getport() function instead of its own local version. This gives the showmount command immediate support for querying via rpcbindv3/v4 in addition to portmapper, and sets the stage for AF_INET6 support in showmount. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount: destroy RPC client when finishedChuck Lever2008-09-261-0/+4
| | | | | | | | | Clean up: call clnt_destroy() in the showmount command as needed to destroy the RPC client properly (and close the associated socket) before the program exits. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount command: clean up error returns from connect_nb()Chuck Lever2008-09-261-10/+12
| | | | | | | | | | | | | Clean up connect_nb() in the showmount command. Sometimes it returns -1 on error, and sometimes a negative errno. On error, it should always return one of these or the other, not both. Similar functions in other parts of nfs-utils return -1 on error, and set errno; so let's do that here too. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* showmount issuesMartin Leisner2008-07-251-2/+4
| | | | | | | | The connect_nb() routne returns zero for success and a negative value for failure which was not being interpreted correctly by the getport() routine. This patch fixes that problem. Signed-off-by: Steve Dickson <steved@redhat.com>
* Make sure showmount fails when rpc.mountd is not registeredSteve Dickson2008-03-181-1/+3
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Add -Wstrict-prototypes to compiler args, and fix warnings caused.Neil Brown2007-07-291-9/+5
|
* update manpages for showmount and mountdJeff Layton2007-05-081-2/+4
| | | | | | | | This patch updates the manpages for showmount and mountd. It adds a description of the new mountd -r option, and a caveat about the unreliability of showmount -a. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* Fix showmount bugs.Neil Brown2007-02-221-3/+6
| | | | | | | When doing a nonblocked connect, we need to select for 'write', not 'read'. Also, when a tcp socket has been connected, we should use clnttcp_create to make a tcp client, not clntudp_bufcreate !!
* Remove explicit path names from man page for showmount and lockd.Neil Brown2007-02-051-1/+1
| | | | | Just like statd, the path isn't needs in the man page and different distros install it in different places.
* Various minor manpage fixes.Steinar H. Gunderson2007-02-051-1/+1
| | | | | | | | | | This mostly takes care of the difference between - and \-; in man pages, the former is hyphen (which indicates, among others, that a line might be split at that point), while the latter is a dash. For options, the latter is correct. There's also one minor grammatical fix.
* Reduce showmount timeouts.Ian Kent2006-12-201-8/+201
| | | | | | | | | | | | | | | | | | | Showmount itself tries to use a short timeout but the RPC clnttcp_create and clntudp_create calls will call portmap internally to get the port to use if it is set to 0 in the passed address structure. The above calls then use the internal timeouts, basically 60 seconds, which slows things down. Also the for tcp a blocking connect is used which can take quite a while to timeout as well. showmount tries tcp then udp so a fail can go through several lengthy waits before failing. I've grabbed some of the autofs code and put together a patch to allow specification of the timeouts for the portmap getport and to implement a non-blocking connect. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix typos in various man pages.Steinar H. Gunderson2006-07-051-2/+2
|
* Remove **/Makefile.in, aclocal.m4, configure, andNeil Brown2006-04-171-569/+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-12/+0
|
* More automake stuffneilbrown2005-12-201-0/+561
|
* Autogen updateneilbrown2005-12-202-1/+17
|
* Added TOP, as needed, for easier compile in subdirectoriesgmorris2005-04-121-0/+1
|
* * utils/showmount/showmount.c (main): Fix inet_ntoa() parameter.chip2003-09-091-1/+1
| | | | | * tools/rpcgen/rpc_cout.c (print_header): Remove unused vars. * tools/rpcgen/rpc_parse.c (def_union): Likewise.
* 2001-11-26 Chip Salzenberg <chip@pobox.com>chip2001-11-261-2/+1
| | | | | | | | | | * 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.
* Initial revisionhjl1999-10-183-0/+356