+ my_client.m_naddr = 1;
+ set_addrlist(&my_client, 0, caller);
+ my_exp.m_client = &my_client;
+
+ exp = NULL;
+ for (i = 0; !exp && i < MCL_MAXTYPES; i++)
+ for (exp = exportlist[i].p_head; exp; exp = exp->m_next) {
+ if (strcmp(path, exp->m_export.e_path))
+ continue;
+ if (!client_matches(exp, my_client.m_hostname, ai))
+ continue;
+ if (exp->m_export.e_flags & NFSEXP_V4ROOT)
+ /* not acceptable for v[23] export */
+ continue;
+ break;
+ }
+ *error = not_exported;
+ if (!exp)
+ return NULL;
+
+ my_exp.m_export = exp->m_export;
+ exp = &my_exp;
+ return exp;
+}
+
+static nfs_export *
+auth_authenticate_internal(const struct sockaddr *caller, const char *path,
+ struct addrinfo *ai, enum auth_error *error)
+{
+ nfs_export *exp;
+
+ if (new_cache) {
+ exp = auth_authenticate_newcache(caller, path, ai, error);
+ if (!exp)
+ return NULL;