X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=5612a9edf547ed626f35d27d50ffc3e22aa88612;hp=6cf24ceb4f9f9d3b919cbe1c24cbc22e290945a5;hb=e3f2d2262fed12f0f6b77c5ac1c4072d82f1e754;hpb=74a8f33de5f26d6bab11d5299318035d65bd60d0 diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 6cf24ce..5612a9e 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -490,6 +490,7 @@ void nfsd_export(FILE *f) int i; char *dom, *path; nfs_export *exp, *found = NULL; + int found_type = 0; if (readline(fileno(f), &lbuf, &lbuflen) != 1) @@ -516,12 +517,15 @@ void nfsd_export(FILE *f) continue; if (strcmp(path, exp->m_export.e_path)) continue; - if (!found) + if (!found) { found = exp; - else { - xlog(L_WARNING, "%s exported to both %s and %s in %s", - path, exp->m_client->m_hostname, found->m_client->m_hostname, + found_type = i; + } else if (found_type == i && found->m_warned == 0) { + xlog(L_WARNING, "%s exported to both %s and %s, " + "arbitrarily choosing options from first", + path, found->m_client->m_hostname, exp->m_client->m_hostname, dom); + found->m_warned = 1; } } }