diff options
author | NeilBrown <neilb@suse.de> | 2012-05-01 15:20:31 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2012-05-01 15:29:59 -0400 |
commit | 3d7faa0249332e23a2dc2e3e78020ed6bc66036a (patch) | |
tree | 9378d20b8ec40debdde75af86076bba5f8cac062 /utils/mountd | |
parent | 8ed7383f1b1766f12a3ad3d6259e5e9e37b64727 (diff) | |
download | nfs-utils-3d7faa0249332e23a2dc2e3e78020ed6bc66036a.tar.gz nfs-utils-3d7faa0249332e23a2dc2e3e78020ed6bc66036a.tar.xz nfs-utils-3d7faa0249332e23a2dc2e3e78020ed6bc66036a.zip |
auth_authenticate_newcache: prefer non-V4ROOT export over V4ROOT exports
Currently auth_authenticate_internal finds an export and if it
is a V4ROOT export, it reports that there is no match. Unlike
lookup_export() it doesn't keep looking for an acceptable export.
So remove the test from auth_authenticate_internal(), and add it to
auth_authenticate_newcache(), where the search can be allowed to
continue.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mountd')
-rw-r--r-- | utils/mountd/auth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index ccc849a..3843756 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -159,6 +159,9 @@ auth_authenticate_newcache(const struct sockaddr *caller, continue; if (use_ipaddr && !client_check(exp->m_client, ai)) continue; + if (exp->m_export.e_flags & NFSEXP_V4ROOT) + /* not acceptable for v[23] export */ + continue; break; } *error = not_exported; @@ -187,10 +190,6 @@ auth_authenticate_internal(const struct sockaddr *caller, const char *path, return NULL; } } - if (exp->m_export.e_flags & NFSEXP_V4ROOT) { - *error = no_entry; - return NULL; - } if (!(exp->m_export.e_flags & NFSEXP_INSECURE_PORT) && nfs_get_port(caller) >= IPPORT_RESERVED) { *error = illegal_port; |