X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fexport%2Fxtab.c;h=e953071ea901dfc0c9ff0c03946acf98471f11a1;hp=3b1dcce325493fec61fbb5385b9a89aadff8da84;hb=3d0b8f58fbfa6e17c9b7ec7f73b5a3bb1fa81bcc;hpb=f0ed8401e854e1cbd23b2fb5dca5e88dec2df7c4 diff --git a/support/export/xtab.c b/support/export/xtab.c index 3b1dcce..e953071 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -14,12 +14,14 @@ #include #include #include -#include "xmalloc.h" + #include "nfslib.h" #include "exportfs.h" #include "xio.h" #include "xlog.h" +#include "v4root.h" +int v4root_needed; static void cond_rename(char *newfile, char *oldfile); static int @@ -36,6 +38,8 @@ xtab_read(char *xtab, char *lockfn, int is_export) if ((lockid = xflock(lockfn, "r")) < 0) return 0; setexportent(xtab, "r"); + if (is_export == 1) + v4root_needed = 1; while ((xp = getexportent(is_export==0, 0)) != NULL) { if (!(exp = export_lookup(xp->e_hostname, xp->e_path, is_export != 1)) && !(exp = export_create(xp, is_export!=1))) { @@ -48,6 +52,8 @@ xtab_read(char *xtab, char *lockfn, int is_export) case 1: exp->m_xtabent = 1; exp->m_mayexport = 1; + if ((xp->e_flags & NFSEXP_FSID) && xp->e_fsid == 0) + v4root_needed = 0; break; case 2: exp->m_exported = -1;/* may be exported */