jails and output of df/mount [PATCH]
Juergen Unger
j.unger at addict.de
Mon May 16 16:25:04 GMT 2005
Hi !
within a jail there are at this time two possibilities
of operation for the syscall getfsstat (which is used e.g.
for the commands 'df' and 'mount'):
security.jail.getfsstatroot_only = 0:
getfsstat return all filesystems mounted anywhere at the machine
security.jail.getfsstatroot_only = 1:
getfsstat returns the filesystem where the jail-root is in
and nothing more (mountpoints within the jails fs-tree are not
returned)
IMHO is this 2nd one not what is really needed: If we
have additional filesystems mounted within the jails tree
they should be visible too so that they are shown with
a simple 'df' or 'mount'.
I made a small patch for this which is available at
<http://www.addict.de/unger/fbsd/patch-20050516/>
and should work against CURRENT and RELENG_5_4
Any comments ? I am not sure if there is locking needed
(mtx_lock, mtx_unlock) around this new piece of code, at this
time ot works for me without locking...
Any other opinions ?
bye,
Juergen
More information about the freebsd-hackers
mailing list