]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/auth.c
exports: turn on pseudo exports
[nfs-utils.git] / utils / mountd / auth.c
index dfe61ea7fcc7c8d49faa697541f31ebf0e8d9eee..2ed80bcfaef4aa6e4a37da9ca0034c20ae908317 100644 (file)
@@ -20,6 +20,7 @@
 #include "exportfs.h"
 #include "mountd.h"
 #include "xmalloc.h"
+#include "v4root.h"
 
 enum auth_error
 {
@@ -102,6 +103,8 @@ auth_reload()
        memset(&my_client, 0, sizeof(my_client));
        xtab_export_read();
        check_useipaddr();
+       v4root_set();
+
        ++counter;
 
        return counter;
@@ -142,7 +145,7 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller,
 
                exp = NULL;
                for (i = 0; !exp && i < MCL_MAXTYPES; i++) 
-                       for (exp = exportlist[i]; exp; exp = exp->m_next) {
+                       for (exp = exportlist[i].p_head; exp; exp = exp->m_next) {
                                if (strcmp(path, exp->m_export.e_path))
                                        continue;
                                if (!use_ipaddr && !client_member(my_client.m_hostname, exp->m_client->m_hostname))
@@ -169,8 +172,7 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller,
                }
        }
        if (!(exp->m_export.e_flags & NFSEXP_INSECURE_PORT) &&
-                   (ntohs(caller->sin_port) <  IPPORT_RESERVED/2 ||
-                    ntohs(caller->sin_port) >= IPPORT_RESERVED)) {
+                    ntohs(caller->sin_port) >= IPPORT_RESERVED) {
                *error = illegal_port;
                return NULL;
        }