getfsstat visibility patch

Oliver Fromme check+ibcbd100rsuxipvu at
Thu Feb 3 07:24:40 PST 2005


Joerg Sonnenberger <joerg at xxxxxxxxxxxxxxxxx> wrote:
 > attached patch changes getfsstat to only show filesystems
 > under the current chroot() path (or the jail root, if jailed, but
 > not chrooted).

I wrote similar patches for FreeBSD 4 ages ago, but they
never got committet.  It's PR kern/26740 and kern/47586:

The latter introduces a sysctl variable to control the
behaviour (it has three possible settings).  They change
statfs(), fstatfs() and getfsstat().

The main problem that I had to solve is the fact that
some tools (notably ls(1)) don't like it if no mounts
are visible at all, which can be the case when there are
no mounts at or below the jail chroot.  My second PR
solves that by providing a special sysctl setting that
will display only a faked root mount for all jails.

I don't know if any of this applies to DragonFly and your
(Joerg's) patch, but I thought I might share my experience

Best regards

Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany

``All that we see or seem is just a dream within a dream.''
(E. A. Poe)

More information about the Submit mailing list