Hello, On 3/29/21 6:54 AM, Roberto Bergantinos Corpas wrote: > If root of the filesystem is exported, it cannot be explicitly > unexported, since unexportfs_parsed, in order to deal with trailing > '/', will leave nlen at 0 for root exported case > > Signed-off-by: Roberto Bergantinos Corpas <rbergant@xxxxxxxxxx> > --- > utils/exportfs/exportfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c > index 9fcae0b3..9b6f4f5a 100644 > --- a/utils/exportfs/exportfs.c > +++ b/utils/exportfs/exportfs.c > @@ -372,7 +372,7 @@ unexportfs_parsed(char *hname, char *path, int verbose) > * so need to deal with it. > */ > size_t nlen = strlen(path); > - while (path[nlen - 1] == '/') > + while ((path[nlen - 1] == '/') && (nlen > 1)) > nlen--; I decided to use Ondrej's version sine the nlen is tested first before the index into path was made. steved. > > for (exp = exportlist[htype].p_head; exp; exp = exp->m_next) { >