]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/cache.c
Imported Debian patch 1.0.10-5
[nfs-utils.git] / utils / mountd / cache.c
index 5285e10d8fbcb85eb199d7fea01c29cc6a19e63d..0296f4efd19f187ea20bcfcf1d785e8a05f29bc3 100644 (file)
@@ -381,6 +381,12 @@ void cache_export(nfs_export *exp)
 {
        FILE *f;
 
+       if (exp->m_export.e_maptype != CLE_MAP_IDENT) {
+               xlog(L_ERROR, "%s: unsupported mapping; kernel supports only 'identity' (default)",
+                   exp->m_export.m_path);
+               return;
+       }
+
        f = fopen("/proc/net/rpc/auth.unix.ip/channel", "w");
        if (!f)
                return;
@@ -429,7 +435,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;
 }