NFSv3: try get_root user-supplied security_flavor
authorJ. Bruce Fields <bfields@fieldses.org>
Tue, 3 Jan 2006 08:55:48 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:55 +0000 (14:58 -0500)
 Thanks to Ed Keizer for bug and root cause.  He says: "... we could only mount
 the top-level Solaris share. We could not mount deeper into the tree.
 Investigation showed that Solaris allows UNIX authenticated FSINFO only on the
 top level of the share. This is a problem because we share/export our home
 directories one level higher than we mount them. I.e. we share the partition
 and not the individual home directories. This prevented access to home
 directories."

 We still may need to try auth_sys for the case where the client doesn't have
 appropriate credentials.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs3proc.c

index c172a7584646cd8099c2ea2e1cc3f7107027688d..ed67567f0556ab4711213093975deac920e85d09 100644 (file)
@@ -68,26 +68,38 @@ nfs3_async_handle_jukebox(struct rpc_task *task)
        return 1;
 }
 
-/*
- * Bare-bones access to getattr: this is for nfs_read_super.
- */
 static int
-nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
-                  struct nfs_fsinfo *info)
+do_proc_get_root(struct rpc_clnt *client, struct nfs_fh *fhandle,
+                struct nfs_fsinfo *info)
 {
        int     status;
 
        dprintk("%s: call  fsinfo\n", __FUNCTION__);
        nfs_fattr_init(info->fattr);
-       status = rpc_call(server->client_sys, NFS3PROC_FSINFO, fhandle, info, 0);
+       status = rpc_call(client, NFS3PROC_FSINFO, fhandle, info, 0);
        dprintk("%s: reply fsinfo: %d\n", __FUNCTION__, status);
        if (!(info->fattr->valid & NFS_ATTR_FATTR)) {
-               status = rpc_call(server->client_sys, NFS3PROC_GETATTR, fhandle, info->fattr, 0);
+               status = rpc_call(client, NFS3PROC_GETATTR, fhandle, info->fattr, 0);
                dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
        }
        return status;
 }
 
+/*
+ * Bare-bones access to getattr: this is for nfs_read_super.
+ */
+static int
+nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
+                  struct nfs_fsinfo *info)
+{
+       int     status;
+
+       status = do_proc_get_root(server->client, fhandle, info);
+       if (status && server->client_sys != server->client)
+               status = do_proc_get_root(server->client_sys, fhandle, info);
+       return status;
+}
+
 /*
  * One function for each procedure in the NFS protocol.
  */
This page took 0.026464 seconds and 5 git commands to generate.