[Ocfs2-devel] [RFC] The reflink(2) system call v4.

James Morris jmorris at namei.org
Thu May 14 16:25:33 PDT 2009


On Thu, 14 May 2009, Stephen Smalley wrote:

> And you can likely make preserve_security a simple bool (set from some
> caller-provided flag) rather than an int.  At which point the SELinux
> wiring for the new hook would be something like this:
> 
> If we are preserving security attributes on the reflink, then treat it
> like creating a link to an existing file;

Do we also need to somewhat consider it like a new file? e.g. in the case 
of create_sid being set (if different to the existing security attribute), 
I believe we need to fail the operation because security attributes are 
not preserved, and also decide which error code to return (the user may be 
confused if it's EACCES -- EINVAL might be better).  Similar for reflinks 
on a context mounted file system, although create_sid needs to be checked 
during inode instantiation (unless we, say, add set a preserve_sid flag 
which overrides create_sid and is cleared upon use).


- James
-- 
James Morris
<jmorris at namei.org>



More information about the Ocfs2-devel mailing list