X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=0296f4efd19f187ea20bcfcf1d785e8a05f29bc3;hp=34f949c66b90200973856b6230f9095fe8675fcc;hb=e6b281c7a032ccb2a0f71ef983e50bf80b261dc1;hpb=4929f11159f0e6568f13820f114594028fc81e2d diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 34f949c..0296f4e 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -6,7 +6,10 @@ * and listen for requests (using my_svc_run) * */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -378,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; @@ -426,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; }