[lkml]   [2008]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [TOMOYO #9 (2.6.27-rc7-mm1) 1/6] LSM adapter functions.
Quoting Kentaro Takeda (
> Serge E. Hallyn wrote:
> > I suppose you could do something like define both _path and _inode,
> > save away your result from the _path hook but always return 0, there,
> > then if you'd saved off an error and you make it to the _inode hook,
> > return the error there...
> You mean do MAC checks in security_path_*() and return error code of
> security_path_*() in security_inode_*()? Then, method for passing the
> error code to security_inode_*() is a problem.
> It was possible to store the error code into current->security->
> something. But now, it is impossible to store the error code into
> current->cred->security->something because current->cred is shared by
> multiple processes. To solve this problem, we everytime need to copy
> current->cred in security_path_*() and we need a new hook called just
> after returning from vfs_* (like mnt_drop_write()) for clearing the
> error code.
> Or, another way is to pass the error code as a vfs_*() parameter.
> What do you think these approaches?

Just keep your own hash table.


 \ /
  Last update: 2008-10-02 15:43    [W:0.061 / U:6.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site