summaryrefslogtreecommitdiffstats
path: root/utils/gssd
Commit message (Collapse)AuthorAgeFilesLines
* rpc.gssd: don't call printerr from signal handlerJ. Bruce Fields2012-08-061-3/+1
| | | | | | | | | | | | | | From: "J. Bruce Fields" <bfields@redhat.com> printerr() isn't actually safe to call from a signal handler. It might be possible to make it so, but I think this is the only case in nfs-utils where we try to, and I'm not convince it's worth it. This fixes a bug that would eventually cause mounts to hang when gssd is run with -vv. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.gssd: simplify signal handlingJ. Bruce Fields2012-08-061-6/+5
| | | | | | | | | From: "J. Bruce Fields" <bfields@redhat.com> We're not actually using the extra sa_sigaction parameters. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.gssd: close upcall pipe on POLLHUPChuck Lever2012-07-193-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a POLLHUP event is received on a pipe file descriptor, that means the other side has closed its end of the pipe. If the receiver does not close its end of the pipe, the pipe is left in an open-but-unlinked state. For a "gssd" upcall pipe, the kernel may close its end, removing the directory entry for it, and then later create a fresh pipe named "gssd" in the same directory. In this case, rpc.gssd continues to listen on the open-but-unlinked previous "gssd" pipe. Thus upcalls on the new "gssd" pipe are left unanswered. In addition, poll(2) continues to return POLLHUP on the old pipe. Since there is no logic to close the pipe in rpc.gssd, poll(2) always returns immediately, and rpc.gssd goes into a tight loop. Typically, the kernel closes upcall pipes and destroys their parent directory at the same time. When an RPC client's directory vanishes, rpc.gssd sees the change via dnotify and eventually invokes destroy_client() which closes the user-space end of the pipes. However, if the kernel wants to switch authentication flavors (say from AUTH_KRB5 to AUTH_UNIX) on an RPC client without destroying it, the upcall pipes go away, but the RPC client's directory remains. rpc.gssd invokes update_client_list(), but that logic never closes upcall pipes if the client directory is still in place. After a POLLHUP on a pipe, close it when rpc.gssd reconstructs its list of upcall clients. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add -l option to gssd to force legacy behaviourMichael Weiser2012-04-164-4/+40
| | | | | | | | | | Implement a new option -l to force gssd to ignore its kernel's crypto capabilities and use just the Single DES legacy encryption types to be compatible with old servers. This is only relevant if those servers have strong keys in their keytab. Signed-off-by: Steve Dickson <steved@redhat.com> Tested-by: Michael Weiser <weiser@science-computing.de>
* gssd: Look for user creds in user defined directorySteve Dickson2012-03-223-3/+36
| | | | | | | | | The user credential cache currently is kept in /tmp. In upcoming Kerberos release that will be moved to /run/user/<username>/. This patch enables gssd to look in both the old and new caches Signed-off-by: Steve Dickson <steved@redhat.com>
* Kill SPKM3: Remove also the dependent lipkey mechanismSimo Sorce2012-03-121-1/+0
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Kill SPKM3: remove spkm3 from common gssd codeSimo Sorce2012-03-124-191/+0
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Kill SPKM3: Remove spkm3 support from gssdSimo Sorce2012-03-125-122/+4
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Kill SPKM3: Remove spkm3 references from svcgssdSimo Sorce2012-03-122-7/+2
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* autoconf: only link binaries that need it to libtirpcJeff Layton2012-01-161-2/+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>
* autoconf: don't let libnfsidmap test add -lnfsidmap to $LIBSJeff Layton2012-01-051-1/+1
| | | | | | | | | | ...as that makes that library get linked into every binary. Also, replace "hardcoded" -lnfsidmap linker flag in Makefiles with a AC_SUBST variable. This fixes a regression introduced in commit d7c64dd. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* gssd: avoid double-free upon write failureJim Meyering2012-01-051-5/+4
| | | | | | | | | Free just calloc'd enc_key.data from one place, unconditionally, after calling write_lucid_keyblock, rather than from three places. Coverity spotted the possible double free. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: Fix typo in debug stringBenjamin Coddington2011-07-211-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* svcgssd: use correct defaults in call to gss_set_allowable_enctypesKevin Coffman2011-07-211-7/+30
| | | | | | | | | | | | | | | | | | | For the window of kernels between 2.6.35 (when the support for newer encryption was added) and 2.6.39 (when the ability to read the supported enctypes from the kernel was added), use a default of all enctypes when the kernel supported enctypes file cannot be read. For kernels before 2.6.35, continue to use a default of only DES enctypes. Note that the version of Kerberos must also support the use of gss_set_allowable_enctypes for service-side negotiations. See also: http://bugzilla.redhat.com/show_bug.cgi?id=719776 Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Document "-n" for svcgssdNeil Brown2011-06-071-2/+9
| | | | | | | The svcgssd man page doesn't mention the "-n" flag. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.svcgssd: Segmentation fault on errorSteve Dickson2011-04-191-1/+2
| | | | | | | | Commit 544ed73d introduced a regression that caused rpc.svcgssd to seg fault on "Wrong principal in request" errors in gss_accept_sec_context() Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Increase the stdio file buffer size for procfs filesSean Finney2011-04-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when writing to /proc/net/rpc/*/channel, if a cache line were larger than the default buffer size (likely 1024 bytes), mountd and svcgssd would split writes into a number of buffer-sized writes. Each of these writes would get an EINVAL error back from the kernel procfs handle (it expects line-oriented input and does not account for multiple/split writes), and no cache update would occur. When such behavior occurs, NFS clients depending on mountd to finish the cache operation would block/hang, or receive EPERM, depending on the context of the operation. This is likely to happen if a user is a member of a large (~100-200) number of groups. Instead, every fopen() on the procfs files in question is followed by a call to setvbuf(), using a per-file dedicated buffer of RPC_CHAN_BUF_SIZE length. Really, mountd should not be using stdio-style buffered file operations on files in /proc to begin with. A better solution would be to use internally managed buffers and calls to write() instead of these stdio calls, but that would be a more extensive change; so this is proposed as a quick and not-so-dirty fix in the meantime. Signed-off-by: Sean Finney <sean.finney@sonyericsson.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Add support to svcgssd to limit the negotiated enctypesKevin Coffman2011-04-066-10/+265
| | | | | | | | | | | | | | | | | | | | Recent versions of Kerberos libraries negotiate and use an "acceptor subkey". This negotiation does not consider that a service may have limited the encryption keys in its keytab. A patch (http://src.mit.edu/fisheye/changelog/krb5/?cs=24603) has been added to the MIT Kerberos code to allow an application to indicate that it wants to limit the encryption types negotiated. (This functionality has been available on the client/initiator side for a while. The new patch adds this support to the server/acceptor side.) This patch adds support to read a recently added nfsd proc file to determine the encryption types supported by the kernel and calls the function to limit encryption types negotiated for the acceptor subkey. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Gssd: modify wrong err message at handle_gssd_upcallMi Jinlong2011-02-091-1/+1
| | | | | | | | Modify wrong err message at handle_gssd_upcall when sscanf encryption types fail. Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Support AD style kerberos automatically in rpc.gssJason Gunthorpe2011-02-092-18/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An Active Directory KDC will only grant a TGT for UPNs, getting a TGT for SPNs is not possible: $ kinit -k host/ib5@ADS.ORCORP.CA kinit: Client not found in Kerberos database while getting initial credentials The correct thing to do for machine credentials is to get a TGT for the computer UPN <HOSTNAME>$@REALM: $ kinit -k IB5\$ $ klist 12/22/10 11:43:47 12/22/10 21:43:47 krbtgt/ADS.ORCORP.CA@ADS.ORCORP.CA Samba automatically creates /etc/krb5.keytab entry for the computer UPN, this patch makes gssd_refresh_krb5_machine_credential prefer it above the SPNs if it is present. The net result is that nfs client works automatically out of the box if samba has been used to setup kerberos via 'net ads join' 'net ads keytab create' Tested using Windows Server 2003 R2 as the AD server. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Improve debugging in svcgssdSteve Dickson2011-01-143-3/+81
| | | | | | | | | | | | | Added in gss_display_error() which translates the GSS error into the actual GSS macro name. Currently only the translation of these errors are logged. Since those translations are buried deep in the kerberos library code, having the actual GSS macro name makes it easier to follow the code. Moved the nfs4_init_name_mapping() call into main() so if debug is enabled the DNS name and realms will be logged during start up. Signed-off-by: Steve Dickson <steved@redhat.com>
* Added the -p <principal> flag to the svcgssd manpageEberhard Kuemmerle2010-09-281-2/+4
| | | | | Signed-off-by: Eberhard Kuemmerle <E.Kuemmerle@fz-juelich.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* svcgssd: Adding a <-p principal> flagEberhard Kuemmerle2010-09-284-12/+23
| | | | | | | | | Allow the principal that is used to get the machines creds definable on the command like with the new '-p <principal>'. This is useful in cluster environments. Signed-off-by: Eberhard Kuemmerle <E.Kuemmerle@fz-juelich.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from svcgssd_proc.cSteve Dickson2010-08-091-9/+3
| | | | | | | | | svcgssd_proc.c: In function 'send_response': svcgssd_proc.c:135: warning: unused parameter 'f' svcgssd_proc.c: In function 'handle_nullreq': svcgssd_proc.c:434: warning: comparison of unsigned expression < 0 is always false Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from svcgssd.cSteve Dickson2010-08-091-1/+1
| | | | | | | svcgssd.c: In function 'sig_hup': svcgssd.c:160: warning: unused parameter 'signal' Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from gssd_proc.cSteve Dickson2010-08-091-3/+3
| | | | | | | | | | | | gssd_proc.c: In function 'create_auth_rpc_client': gssd_proc.c:939: warning: comparison between signed and unsigned integer expressions gssd_proc.c:939: warning: comparison between signed and unsigned integer expressions gssd_proc.c: In function 'handle_krb5_upcall': gssd_proc.c:1164: warning: comparison between signed and unsigned integer expressions gssd_proc.c: In function 'handle_spkm3_upcall': gssd_proc.c:1178: warning: comparison between signed and unsigned integer expressions Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from krb5_util.cSteve Dickson2010-08-093-10/+23
| | | | | | | | | krb5_util.c: In function 'realm_and_service_match': krb5_util.c:617: warning: unused parameter 'context' krb5_util.c: In function 'limit_krb5_enctypes': krb5_util.c:1275: warning: unused parameter 'uid' Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from gssd_main_loop.cSteve Dickson2010-08-091-0/+2
| | | | | | | | | gssd_main_loop.c: In function 'dir_notify_handler': gssd_main_loop.c:64: warning: unused parameter 'sig' gssd_main_loop.c:64: warning: unused parameter 'si' gssd_main_loop.c:64: warning: unused parameter 'data' Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed warnings from gssd.cSteve Dickson2010-08-091-1/+1
| | | | | | | gssd.c: In function 'sig_hup': gssd.c:78: warning: unused parameter 'signal' Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: picking wrong credsDoug Nazar2010-07-191-0/+7
| | | | | | | | | When not using machine credentials for root, if the machine credential cache file is newer than the root credential file the wrong file will get picked. Ignore the machine file in this case. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: Fix endtime issueDoug Nazar2010-07-192-1/+5
| | | | | | | | | Commit 4c5ff6d4 removed the setting of endtime for a few contexts by accident. Now to figure out why I get stale handles on submounts. Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed some miscellaneous warnings in the new gssd code.Steve Dickson2010-04-161-3/+3
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Add support for non-DES encryption types.Kevin Coffman2010-04-163-48/+222
| | | | | | | Sends a new format of context information to the kernel. (Requires kernel support to do anything useful.) Signed-off-by: Steve Dickson <steved@redhat.com>
* Try to use kernel function to determine supported Kerberos enctypes.Kevin Coffman2010-04-162-3/+94
| | | | | | | | | This patch replaces a hard-coded list with a function to obtain the Kerberos encryption types that the kernel's rpcsec_gss code can support. Defaults to old behavior if kernel does not supply information. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: move function limit_krb5_enctypes into the exported functions areaKevin Coffman2010-04-161-55/+54
| | | | | | | | cleanup: Move function limit_krb5_enctypes() from the section containing static functions into the section containing externally visible functions. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: on krb5 upcall, have gssd send a more granular error codeJeff Layton2010-01-122-19/+24
| | | | | | | | | | | | | | | | | | | | | Currently if a krb5 context expires, GSSAPI authenticated RPC calls start returning error (-EACCES in particular). This is bad when someone has a long running job that's doing filesystem ops on a krb5 authenticated NFS mount and just happens to forget to redo a 'kinit' in time. The existing gssd always does a downcall with a '-1' error code if there are problems, and the kernel always ignores this error code. Begin to fix this by having gssd distinguish between someone that has no credcache at all, and someone who has an expired one. In the case where there is an existing credcache, have gssd downcall with an error code of -EKEYEXPIRED. If there's not a credcache, then downcall with an error of -EACCES. We can then have the kernel use this error code to handle these situations differently. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: have gssd deal with scopeid field in upcallJeff Layton2009-12-111-25/+35
| | | | | | | | | | | | | | | | Recent kernels (2.6.32) have started displaying the scopeid for some addresses in the upcall. gssd doesn't know how to deal with them. Change gssd to use getaddrinfo instead of inet_pton since that can deal with scopeid's in addresses. That also allows us to elminate the port conversion in read_service_info. If getaddrinfo returns an address with a non-zero sin6_scope_id however, reject it. getnameinfo ignores that field and just uses the sin6_addr part when resolving. But, two addresses that differ only in sin6_scope_id could refer to completely different hosts. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: process service= attribute in new upcallOlga Kornievskaia2009-11-163-13/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add processing of the "service=" attribute in the new gssd upcall. If "service" is specified, then the kernel is indicating that we must use machine credentials for this request. (Regardless of the uid value or the setting of root_uses_machine_creds.) If the service value is "*", then any service name can be used. Otherwise, it specifies the service name that should be used. (For now, the values of service will only be "*" or "nfs".) Restricting gssd to use "nfs" service name is needed for when the NFS server is doing a callback to the NFS client. In this case, the NFS server has to authenticate itself as "nfs" -- even if there are other service keys such as "host" or "root" in the keytab. Another case when the kernel may specify the service attribute is when gssd is being asked to create the context for a SETCLIENT_ID operation. In this case, machine credentials must be used for the authentication. However, the service name used for this case is not important. Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: process target= attribute in new upcallOlga Kornievskaia2009-11-161-3/+23
| | | | | | | | | | | | | | | | | | | | | | Add processing of the "target=" attribute in the new gssd upcall. Information in this field is used to construct the gss service name of the server for which gssd will create a context . This, along with the next patch handling "service=", is needed for callback security. For Kerberos, the NFS client will use a service principal present in its keytab during authentication of the SETCLIENT_ID operation. When establishing the context for the callback, the gssd on the NFS server will attempt to authenticate the callback against the principal name used by the client. Note: An NFS client machine must have a keytab for the callback authentication to succeed. Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: handle new client upcallOlga Kornievskaia2009-11-163-31/+168
| | | | | | | | | | | | | | | | | | | | Add support for handling the new client-side upcall. The kernel, beginning with 2.6.29, will attempt to use a new pipe, "gssd", which can be used for upcalls for all gss mechanisms. The new upcall is text-based with an <attribute>=<value> format. Attribute/value pairs are separated by a space, and terminated with a new-line character. The intial version has two required attributes, mech=<gss_mechanism_name> and uid=<user's_UID_number>, and two optional attributes, target=<gss_target_name> and service=<value>. Future kernels may add new attribute/value pairs. Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: print full client directory being handledOlga Kornievskaia2009-11-161-2/+2
| | | | | | | | | For convenience, add the full name of the upcall pipe being processed. (Distinquishes between "normal" upcall, and a callback upcall.) Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: add upcall support for callback authenticationOlga Kornievskaia2009-11-164-49/+143
| | | | | | | | | | | | | | Change the processing so that all subdirectories within the rpc_pipefs directory are treated equally. Any "clnt" directories that show up within any of them are processed. (As suggested by Bruce Fields.) Note that the callback authentication will create a new "nfs4d_cb" subdirectory. Only new kernels (2.6.29) will create this new directory. (The need for this directory will go away with NFSv4.1 where the callback can be done on the same connection as the fore-channel.) Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: refactor update_client_list()Olga Kornievskaia2009-11-162-9/+22
| | | | | | | | | Split out the processing for a pipe to a separate routine. The next patch adds a new pipe to be processed. Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* This patch adds the krb5 hostbased principal, name which theOlga Kornievskaia2009-11-161-7/+87
| | | | | | | | | | | | | | nfs client used to authenticate, to the svcgssd downcall information. This information is needed for the callback authentication. When estabishing the callback, nfsd will pass the principal name in the upcall to the gssd. gssd will acquire a service ticket for the specified principal name. Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Gssd blindly caches machine credentialsLukas Hejtmanek2009-08-273-41/+48
| | | | | | | | | | | | | | We have a problem with rpc.gssd which blindly caches machine credentials. E.g., if someone deletes /tmp/krb5cc_machine_REALM, rpc.gss does not create new one until the old one expires. Also, it has problems with clock skew, if time goes back and gssd thinks that machine credentials are not expired yet. The following patch tries to use cache but in case of failure, it tries it again without cache. Any comments? Signed-off-by: Lukas Hejtmanek <xhejtman@ics.muni.cz> Acked-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* mydaemon: remove closeall() calls from mydaemon()Steve Dickson2009-06-291-4/+10
| | | | | | | | | | | | | | | idmapd and svcgssd have a mydaemon() routine that uses closeall() to close file descriptors. Unfortunately, they aren't using it correctly and it ends up closing the pipe that the child process uses to talk to its parent. Fix this by not using closeall() in this routine and instead, just close the file descriptors that we know need to be closed. If /dev/null can't be opened for some reason, then just have the child exit with a non-zero error. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Set the verbosity level in both the librpcsecgss andSteve Dickson2009-06-222-0/+6
| | | | | | | libnfsidmapd libraries when verbosity level is set by the '-v' flag it on either daemon. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: add IPv6 code to gssdJeff Layton2009-04-151-0/+44
| | | | | | | | | | All of the pieces to handle IPv6 are now in place. Add IPv6-specific code wrapped in the proper #ifdef's so that IPv6 support works when it's enabled at build-time. Reviewed-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: switch gssd to use standard function for getting an RPC clientJeff Layton2009-04-151-29/+12
| | | | | | | | | | We already have a common function for setting up an RPC client. That function uses the tirpc API when tirpc is enabled and is also already IPv6 enabled. Switch gssd to use it. Reviewed-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: query for remote port using rpcbind instead of getaddrinfoJeff Layton2009-04-151-52/+86
| | | | | | | | | | | | | | | We already have the server's address from the upcall, so we don't really need to look it up again, and querying the local services DB for the port that the remote server is listening on is just plain wrong. Use rpcbind to set the port for the program and version that we were given in the upcall. The exception here is NFSv4. Since NFSv4 mounts are supposed to use a well-defined port then skip the rpcbind query for that and just set the port to the standard one (2049). Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>