X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=9bbbfb3c3a6cc3a4c616eefd64a3a0d300004f9b;hp=23e2344559bb3bec48583c3a15d0187c44c03a3d;hb=4cacc965;hpb=8d52fc2691783dc9ef5bd9d9a1fa4c0ec33b20bc diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 23e2344..9bbbfb3 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -215,8 +215,17 @@ int get_uuid(char *path, char *uuid, int uuidlen, char *u) if (path) { val = get_uuid_blkdev(path); - if (!val) - return 0; + if (!val) { + struct statfs64 st; + + if (statfs64(path, &st)) + return 0; + if (!st.f_fsid.__val[0] && !st.f_fsid.__val[1]) + return 0; + snprintf(fsid_val, 17, "%08x%08x", + st.f_fsid.__val[0], st.f_fsid.__val[1]); + val = fsid_val; + } } else { val = uuid; } @@ -385,7 +394,7 @@ void nfsd_fh(FILE *f) /* Now determine export point for this fsid/domain */ for (i=0 ; i < MCL_MAXTYPES; i++) { nfs_export *next_exp; - for (exp = exportlist[i]; exp; exp = next_exp) { + for (exp = exportlist[i].p_head; exp; exp = next_exp) { struct stat stb; char u[16]; char *path; @@ -645,7 +654,7 @@ void nfsd_export(FILE *f) /* now find flags for this export point in this domain */ for (i=0 ; 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 (!use_ipaddr && !client_member(dom, exp->m_client->m_hostname)) continue; if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT) {