]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/cache.c
remove extraneous mountlist_add/del calls and change remaining ones to use IP addresses
[nfs-utils.git] / utils / mountd / cache.c
index 34f949c66b90200973856b6230f9095fe8675fcc..726b98fc9b2a35681e7a4c07d2c2412b068ca33b 100644 (file)
@@ -6,7 +6,10 @@
  * and listen for requests (using my_svc_run)
  * 
  */
-#include "config.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <sys/types.h>
 #include <sys/select.h>
@@ -80,9 +83,6 @@ void auth_unix_ip(FILE *f)
                qword_print(f, *client?client:"DEFAULT");
        qword_eol(f);
 
-       if (client && strcmp(ipaddr, client))
-               mountlist_add(ipaddr, *client?client:"DEFAULT");
-
        if (client) free(client);
        
 }
@@ -292,7 +292,6 @@ void nfsd_export(FILE *f)
                qword_printint(f, found->m_export.e_anonuid);
                qword_printint(f, found->m_export.e_anongid);
                qword_printint(f, found->m_export.e_fsid);
-               mountlist_add(dom, path);
        }
        qword_eol(f);
  out:
@@ -370,8 +369,6 @@ void cache_export_ent(char *domain, struct exportent *exp)
        qword_eol(f);
 
        fclose(f);
-
-       mountlist_add(domain, exp->e_path);
 }
 
 void cache_export(nfs_export *exp)
@@ -390,9 +387,6 @@ void cache_export(nfs_export *exp)
        
        fclose(f);
 
-       if (strcmp(inet_ntoa(exp->m_client->m_addrlist[0]), exp->m_client->m_hostname))
-               mountlist_add(inet_ntoa(exp->m_client->m_addrlist[0]), exp->m_client->m_hostname);
-
        cache_export_ent(exp->m_client->m_hostname, &exp->m_export);
 }
 
@@ -426,7 +420,7 @@ cache_get_filehandle(nfs_export *exp, int len, char *p)
        if (failed)
                return NULL;
        memset(fh.fh_handle, 0, sizeof(fh.fh_handle));
-       fh.fh_size = qword_get(&bp, fh.fh_handle, NFS3_FHSIZE);
+       fh.fh_size = qword_get(&bp, (char *)fh.fh_handle, NFS3_FHSIZE);
        return &fh;
 }