Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 708734 Details for
Bug 920408
The result of "showmount -a" is incorrect after set MOUNTD_NFS_V2=no or MOUNTD_NFS_V3=no in /etc/sysconfig/nfs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
showmount: Try the highest mount version then fall back to lower ones
nfs-utils-1.0.9-shownmount-Try-the-highest-mount-version.patch (text/plain), 2.22 KB, created by
Luan Jianhai
on 2013-03-12 03:34:46 UTC
(
hide
)
Description:
showmount: Try the highest mount version then fall back to lower ones
Filename:
MIME Type:
Creator:
Luan Jianhai
Created:
2013-03-12 03:34:46 UTC
Size:
2.22 KB
patch
obsolete
>diff -Nur nfs-utils-1.0.9.orig/utils/showmount/showmount.c nfs-utils-1.0.9/utils/showmount/showmount.c >--- nfs-utils-1.0.9.orig/utils/showmount/showmount.c 2006-07-08 08:04:32.000000000 +0800 >+++ nfs-utils-1.0.9/utils/showmount/showmount.c 2013-03-12 09:53:06.000000000 +0800 >@@ -73,6 +73,14 @@ > exit(n); > } > >+static const rpcvers_t mount_vers_tbl[] = { >+ MOUNTVERS_NFSV3, >+ MOUNTVERS_POSIX, >+ MOUNTVERS, >+}; >+static const unsigned int max_vers_tblsz = >+ (sizeof(mount_vers_tbl)/sizeof(mount_vers_tbl[0])); >+ > int main(argc, argv) > int argc; > char **argv; >@@ -94,6 +102,7 @@ > int i; > int n; > int maxlen; >+ int unsigned vers=0; > char **dumpv; > > program_name = argv[0]; >@@ -174,13 +183,13 @@ > server_addr.sin_port = 0; > msock = RPC_ANYSOCK; > if ((mclient = clnttcp_create(&server_addr, >- MOUNTPROG, MOUNTVERS, &msock, 0, 0)) == NULL) { >+ MOUNTPROG, mount_vers_tbl[vers], &msock, 0, 0)) == NULL) { > server_addr.sin_port = 0; > msock = RPC_ANYSOCK; > pertry_timeout.tv_sec = 3; > pertry_timeout.tv_usec = 0; > if ((mclient = clntudp_create(&server_addr, >- MOUNTPROG, MOUNTVERS, pertry_timeout, &msock)) == NULL) { >+ MOUNTPROG, mount_vers_tbl[vers], pertry_timeout, &msock)) == NULL) { > clnt_pcreateerror("mount clntudp_create"); > exit(1); > } >@@ -189,12 +198,20 @@ > total_timeout.tv_sec = 20; > total_timeout.tv_usec = 0; > >+again: > if (eflag) { > memset(&exportlist, '\0', sizeof(exportlist)); > clnt_stat = clnt_call(mclient, MOUNTPROC_EXPORT, > (xdrproc_t) xdr_void, NULL, > (xdrproc_t) xdr_exports, (caddr_t) &exportlist, > total_timeout); >+ if (clnt_stat == RPC_PROGVERSMISMATCH) { >+ if (++vers < max_vers_tblsz) { >+ (void)CLNT_CONTROL(mclient, CLSET_VERS, >+ (void *)&mount_vers_tbl[vers]); >+ goto again; >+ } >+ } > if (clnt_stat != RPC_SUCCESS) { > clnt_perror(mclient, "rpc mount export"); > exit(1); >@@ -228,6 +245,13 @@ > (xdrproc_t) xdr_void, NULL, > (xdrproc_t) xdr_mountlist, (caddr_t) &dumplist, > total_timeout); >+ if (clnt_stat == RPC_PROGVERSMISMATCH) { >+ if (++vers < max_vers_tblsz) { >+ (void)CLNT_CONTROL(mclient, CLSET_VERS, >+ (void *)&mount_vers_tbl[vers]); >+ goto again; >+ } >+ } > if (clnt_stat != RPC_SUCCESS) { > clnt_perror(mclient, "rpc mount dump"); > exit(1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 920408
: 708734