Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 2024 13:56:56 -0800
From:      Rick Macklem <rick.macklem@gmail.com>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Cc:        Michael Proto <mike@jellydonut.org>
Subject:   RFC: fixing PR#282995
Message-ID:  <CAM5tNy4YHAPUgZddok1U3Oz3vFB26-FC5M6Ocwx7bZhWm%2BUX4Q@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

PR#282995 reports that the "-alldirs" export option is broken,
since it allows an export where the directory path is not a mount point.

I'll admit I did not recall this semantic for -alldirs and I now see it is only
documented in the "Examples" section of exports(5).

Looking at the code, it appears this was broken between releng1 and
releng2.0 (about 30years ago) when the call to mount(2) in mountd.c
was changed from using the path in the exports line to using f_mntonname.
(The check for "it is a mount point" depended on mount(2) failing because
the path was not a mount point.)

I do believe the semantic is a useful one, although making it that way
after 30years might be construed as a POLA violation?

So, what do others think I should do with this?
(A) - Patch mountd to enforce the "must be a mount point when -alldirs
        is specified, plus update exports(5) to state this semantic clearly.
or
(B) - Patch mountd so that it enforces "must be a mount point when -alldirs
        is specified, but only enabled via a new mountd command line option.
        --> ie. Leave the default as not enforced, but allow enforcement based
                  on a new mountd option.
             - Document this in both exports(5) and mountd(8).
or
???

Thanks in advance for your comments, rick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy4YHAPUgZddok1U3Oz3vFB26-FC5M6Ocwx7bZhWm%2BUX4Q>