extern void cache_open(void);
extern struct nfs_fh_len *cache_get_filehandle(nfs_export *exp, int len, char *p);
-extern int cache_export(nfs_export *exp);
+extern int cache_export(nfs_export *exp, char *path);
extern void my_svc_run(void);
p, strerror(errno));
*error = NFSERR_NOENT;
} else if (estb.st_dev != stb.st_dev
- /* && (!new_cache || !(exp->m_export.e_flags & NFSEXP_CROSSMOUNT)) */
+ && (!new_cache || !(exp->m_export.e_flags & NFSEXP_CROSSMOUNT))
) {
xlog(L_WARNING, "request to export directory %s below nearest filesystem %s",
p, exp->m_export.e_path);
*/
struct nfs_fh_len *fh;
- if (cache_export(exp)) {
+ if (cache_export(exp, p)) {
*error = NFSERR_ACCES;
return NULL;
}
get_exportlist(void)
{
static exports elist = NULL;
- static time_t etime = 0;
- time_t atime;
struct exportnode *e, *ne;
struct groupnode *g, *ng, *c, **cp;
nfs_export *exp;
int i;
+ static unsigned int ecounter;
+ unsigned int acounter;
- atime = auth_reload();
- if (elist && atime == etime)
+ acounter = auth_reload();
+ if (elist && acounter == ecounter)
return elist;
- etime = atime;
+ ecounter = acounter;
for (e = elist; e != NULL; e = ne) {
ne = e->ex_next;