Re: [PATCH 2/7] fallocate() implementation in i386, x86_64 and powerpc

2007-07-12 Thread David Patrick Quigley
From: David P. Quigley [EMAIL PROTECTED]

Revalidate the write permissions for fallocate(2), in case security policy has
changed since the files were opened.

Signed-off-by: David P. Quigley [EMAIL PROTECTED]

fs/open.c |3 +++
1 file changed, 3 insertions(+)

diff -uprN -X linux-2.6.22/Documentation/dontdiff 
linux-2.6.22-fallocate/fs/open.c linux-2.6.22-fallocate-selinux/fs/open.c
--- linux-2.6.22-fallocate/fs/open.c2007-07-11 15:51:10.0 -0400
+++ linux-2.6.22-fallocate-selinux/fs/open.c2007-07-11 16:10:43.0 
-0400
@@ -411,6 +411,9 @@ asmlinkage long sys_fallocate(int fd, in
goto out;
if (!(file-f_mode  FMODE_WRITE))
goto out_fput;
+   ret = security_file_permission(file, MAY_WRITE);
+   if (ret)
+   goto out_fput;
 
inode = file-f_path.dentry-d_inode;

-
To unsubscribe from this list: send the line unsubscribe linux-fsdevel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Question about NFSv4 and Linux's Implementation

2007-07-06 Thread David Patrick Quigley
Hello,
I have been reading through the NFSv4 specification and I came
across this piece of information.

Each of the Mandatory and Recommended attributes can be classified in
   one of three categories: per server, per filesystem, or per
   filesystem object. Section 5.4 RFC3530 pg 37

What I am wondering is if these classifications are enforced by
convention or if there is something in the data structures that specify
this. I attempted to look through the Linux implementation to find the
code pertaining to this but I couldn't find it. 

-
To unsubscribe from this list: send the line unsubscribe linux-fsdevel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html