summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-11-05 16:25:26 +0000
committerdfr <dfr@FreeBSD.org>2008-11-05 16:25:26 +0000
commitd070e7ad67366d771b18c3f30acc062e887b0e33 (patch)
treeaa868b4bd0e8e7d45c3d8bb212317a7bc79d76ce /sys/nfsserver
parent6e0ca25e80aa5366e1da75644ef7992ef1cc332d (diff)
downloadFreeBSD-src-d070e7ad67366d771b18c3f30acc062e887b0e33.zip
FreeBSD-src-d070e7ad67366d771b18c3f30acc062e887b0e33.tar.gz
If mountd doesn't specify a secflavor list for the mount, assume that -sec=sys
is what was wanted.
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_srvsubs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index 2cce8be..2d1c2ff 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -1103,6 +1103,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, int *vfslockedp,
int credflavor;
int vfslocked;
int numsecflavors, *secflavors;
+ int authsys;
int v3 = nfsd->nd_flag & ND_NFSV3;
int mountreq;
@@ -1123,6 +1124,15 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, int *vfslockedp,
&numsecflavors, &secflavors);
if (error)
goto out;
+ if (numsecflavors == 0) {
+ /*
+ * This can happen if the system is running with an
+ * old mountd that doesn't pass in a secflavor list.
+ */
+ numsecflavors = 1;
+ authsys = RPCAUTH_UNIX;
+ secflavors = &authsys;
+ }
credflavor = nfsd->nd_credflavor;
for (i = 0; i < numsecflavors; i++) {
if (secflavors[i] == credflavor)
OpenPOWER on IntegriCloud