[patch][jail] fstat according to specified jid
Published June 6th, 2006 in FreeBSDI’ve made top with jail id support. I start to think adding similar functions to other programs.
fstat is the victim. I decide to let fstat can accept jid and then display active files according to the specified jid.
Here comes the patch.
To apply this patch, you must rebuild your kernel.
% cd /usr/src; patch < patch_fstat_jid
% make kernel
...reboot with new kernel
% cd /usr/src/lib/libkvm; make clean install clean
% cd /usr/src/usr.bin/fstat; make clean install clean
... to make other program sync
% cp -f /usr/src/sys/sys/sysctl.h /usr/include/sys/
If you see any error appear, please inform me
How to use?
% fstat -j
NOTE, this patch will be send-pr-ed sooner or later. But I need your test first.
UPDATE 2006/06/12: Thanks to Roberto Lima for ‘cp -f /usr/src/sys/sys/sysctl.h /usr/include/sys/’
UPDATE 2006/06/30: pr is here.
You rock!
its great! but dont forget to do ‘cp -f /usr/src/sys/sys/sysctl.h /usr/include/sys/’
Thank you