28
28
static nfs_export *
29
29
export_allowed_internal(struct hostent *hp, char *path);
31
static void warn_duplicated_exports(nfs_export *exp, struct exportent *eep)
33
if (exp->m_export.e_flags != eep->e_flags) {
34
xlog(L_ERROR, "incompatible duplicated export entries:");
35
xlog(L_ERROR, "\t%s:%s (0x%x) [IGNORED]", eep->e_hostname,
36
eep->e_path, eep->e_flags);
37
xlog(L_ERROR, "\t%s:%s (0x%x)", exp->m_export.e_hostname,
38
exp->m_export.e_path, exp->m_export.e_flags);
40
xlog(L_ERROR, "duplicated export entries:");
41
xlog(L_ERROR, "\t%s:%s", eep->e_hostname, eep->e_path);
42
xlog(L_ERROR, "\t%s:%s", exp->m_export.e_hostname,
43
exp->m_export.e_path);
32
48
export_read(char *fname)
37
53
setexportent(fname, "r");
38
54
while ((eep = getexportent(0,1)) != NULL) {
39
exp = export_lookup(eep->e_hostname, eep->e_path, 0);
43
if (exp->m_export.e_flags != eep->e_flags) {
44
xlog(L_ERROR, "incompatible duplicated export entries:");
45
xlog(L_ERROR, "\t%s:%s (0x%x) [IGNORED]", eep->e_hostname,
46
eep->e_path, eep->e_flags);
47
xlog(L_ERROR, "\t%s:%s (0x%x)", exp->m_export.e_hostname,
48
exp->m_export.e_path, exp->m_export.e_flags);
51
xlog(L_ERROR, "duplicated export entries:");
52
xlog(L_ERROR, "\t%s:%s", eep->e_hostname, eep->e_path);
53
xlog(L_ERROR, "\t%s:%s", exp->m_export.e_hostname,
54
exp->m_export.e_path);
55
exp = export_lookup(eep->e_hostname, eep->e_path, 0);
57
export_create(eep, 0);
59
warn_duplicated_exports(exp, eep);