From: Sucan Subject: how to scan domU to get the inode info? Date: Wed, 6 May 2009 11:13:14 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1658703324==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: 9907yruby@gmail.com List-Id: xen-devel@lists.xenproject.org --===============1658703324== Content-Type: multipart/alternative; boundary=0016361e8806dd1e96046935c784 --0016361e8806dd1e96046935c784 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit hi, I have installed xen 3.2 in my computer , security is very important! although linux is more secure than windows.i need to protect the domu filesystem against hacking or virus. so each time when domu need to write to disk. it send the request to dom0, when i recieve the request in dom0, i will make sure the file it write is not in the /usr/bin directory. if domu is trying to change files under /usr/bin directory, it will be stoped by dom0. this way, i can protect the /usr/bin dir not been changed for ever, even if you have root privilage in domu , you can't change the files in /usr/bin. so ,the first thing i need to do is to scan files in /usr/bin directory to get all the inode info. save each inode number in a file. and transfer the file to dom0, each time domu submit a request to a file , the request will send to dom0. next ,dom0 will compare the inode number in that file .if find the same inode number, dom0 will stop the write request. if not found, domu can write the file as normal. my question is how to scan a directory(such as /usr/bin) and get all inode info? which funtions may i use in the linux kernel api? Can someone please shed some light on this problem? or any suggestions on my ideas above to protect the domu linux filesystem against invasion? -- Best regards, Sucan Computer Department,Beijing Institute of Technology,China --0016361e8806dd1e96046935c784 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hi,

I have installed xen 3.2 in my computer , security is very impor= tant! although linux is more secure than windows.i need to protect the domu= filesystem against hacking or virus. so each time when domu need to write = to disk. it send the request to dom0, when i recieve the request in dom0, i= will make sure the file it write is not in the /usr/bin directory. if domu= is trying to change files under /usr/bin directory, it will be stoped by d= om0.
=A0=A0 this way, i can protect the /usr/bin dir not been changed for ever, = even if you have root privilage in domu , you can't change the files in= /usr/bin.
=A0=A0=A0 so ,the first thing i need to do is to scan files i= n /usr/bin directory to get all the inode info. save each inode number in a= file. and transfer the file to dom0, each time domu submit a request to a = file , the request will send to dom0. next ,dom0 will compare the inode num= ber in that file .if find the same inode number, dom0 will stop the write r= equest. if not found, domu can write the file as normal.
=A0=A0=A0 my question is how to scan a directory(such as /usr/bin) and get = all inode info? which funtions may i use in the linux kernel api? Can someo= ne please shed some light on this problem? or any suggestions on my ideas a= bove to protect the domu linux filesystem against invasion?

--
Best regards,
Sucan
Computer Department,Beijing Institute = of Technology,China
--0016361e8806dd1e96046935c784-- --===============1658703324== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1658703324==--