svn commit: r184694 - in user/dfr/gssapi/7/sys: . nfsserver xdr
Doug Rabson
dfr at FreeBSD.org
Wed Nov 5 08:35:13 PST 2008
Author: dfr
Date: Wed Nov 5 16:35:13 2008
New Revision: 184694
URL: http://svn.freebsd.org/changeset/base/184694
Log:
MFC: 184692,184693
Modified:
user/dfr/gssapi/7/sys/ (props changed)
user/dfr/gssapi/7/sys/nfsserver/nfs_srvsubs.c
user/dfr/gssapi/7/sys/xdr/xdr_mbuf.c
Modified: user/dfr/gssapi/7/sys/nfsserver/nfs_srvsubs.c
==============================================================================
--- user/dfr/gssapi/7/sys/nfsserver/nfs_srvsubs.c Wed Nov 5 16:25:26 2008 (r184693)
+++ user/dfr/gssapi/7/sys/nfsserver/nfs_srvsubs.c Wed Nov 5 16:35:13 2008 (r184694)
@@ -1104,6 +1104,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla
int credflavor;
int vfslocked;
int numsecflavors, *secflavors;
+ int authsys;
int v3 = nfsd->nd_flag & ND_NFSV3;
int mountreq;
@@ -1124,6 +1125,15 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla
&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)
Modified: user/dfr/gssapi/7/sys/xdr/xdr_mbuf.c
==============================================================================
--- user/dfr/gssapi/7/sys/xdr/xdr_mbuf.c Wed Nov 5 16:25:26 2008 (r184693)
+++ user/dfr/gssapi/7/sys/xdr/xdr_mbuf.c Wed Nov 5 16:35:13 2008 (r184694)
@@ -119,7 +119,10 @@ xdrmbuf_getall(XDR *xdrs)
xdrs->x_private = NULL;
}
- m_adj(m, xdrs->x_handy);
+ if (m)
+ m_adj(m, xdrs->x_handy);
+ else
+ MGET(m, M_WAITOK, MT_DATA);
return (m);
}
More information about the svn-src-user
mailing list