Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSMhook

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <agruen@...>
Cc: <crispin@...>, <cliffe@...>, <casey@...>, <mrmacman_g4@...>, <linux-security-module@...>, <linux-kernel@...>
Date: Tuesday, May 29, 2007 - 4:47 pm

Hello.

Andreas Gruenbacher wrote:
AppArmor can't determine which pathname (/tmp/public/file or /tmp/secret/file)
was requested by touch command if bound mount is used in the following way

# mkdir /tmp/public /tmp/secret
# mount -t tmpfs none /tmp/public
# mount --bind /tmp/public /tmp/secret
# touch /tmp/public/file

because security_inode_create() doesn't receive vfsmount, can it?
It is possible to determine that the requested pathname is either
/tmp/public/file or /tmp/secret/file by comparing address of vfsmount
available from current->namespace, but it is impossible to determine which one.

Yes, of course, TOMOYO checks "/tmp/b/f". What I meant PROCEDURE FOR REACHING is
"which directory does the process need to go through to reach the requested file
if the process's current directory is the root of the process's namespace".
And in this case, it is "/tmp/b/f".

Thanks.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_creat..., Andreas Gruenbacher, (Tue May 29, 1:07 pm)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_creat..., Tetsuo Handa, (Tue May 29, 4:47 pm)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_creat..., Andreas Gruenbacher, (Tue May 29, 6:10 pm)