DragonFly BSD
DragonFly submit List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: getfsstat visibility patch


From: Oliver Fromme <check+ibcbd100rsuxipvu@xxxxxxxxxx>
Date: 03 Feb 2005 15:24:40 GMT

Hi,

Joerg Sonnenberger <joerg@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:
http://www.freebsd.org/cgi/query-pr.cgi?pr=26740
http://www.freebsd.org/cgi/query-pr.cgi?pr=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
anyway.

Best regards
   Oliver

-- 
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)



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]