Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37adb89f authored by Bryan Schumaker's avatar Bryan Schumaker Committed by Trond Myklebust
Browse files

NFS: Change initial mount authflavor only when server returns NFS4ERR_WRONGSEC



When attempting an initial mount, we should only attempt other
authflavors if AUTH_UNIX receives a NFS4ERR_WRONGSEC error.
This allows other errors to be passed back to userspace programs.

Signed-off-by: default avatarBryan Schumaker <bjschuma@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 41887590
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2204,8 +2204,6 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
		goto out;
	}
	ret = nfs4_lookup_root(server, fhandle, info);
	if (ret < 0)
		ret = -EAGAIN;
out:
	return ret;
}
@@ -2226,7 +2224,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,

	for (i = 0; i < len; i++) {
		status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]);
		if (status == 0)
		if (status != -EPERM)
			break;
	}
	if (status == 0)