From: "Amit K. Arora" <aarora@linux.vnet.ibm.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-ext4@vger.kernel.org
Cc: xfs@oss.sgi.com, tytso@mit.edu, cmm@us.ibm.com,
suparna@in.ibm.com, adilger@clusterfs.com, dgc@sgi.com
Subject: [PATCH 3/6][TAKE7] revalidate write permissions for fallocate
Date: Fri, 13 Jul 2007 18:18:47 +0530 [thread overview]
Message-ID: <20070713124847.GC22961@amitarora.in.ibm.com> (raw)
In-Reply-To: <20070713123816.GA18000@amitarora.in.ibm.com>
From: David P. Quigley <dpquigl@tycho.nsa.gov>
Revalidate the write permissions for fallocate(2), in case security policy has
changed since the files were opened.
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov>
---
fs/open.c | 3 +++
1 files changed, 3 insertions(+)
Index: linux-2.6.22/fs/open.c
===================================================================
--- linux-2.6.22.orig/fs/open.c
+++ linux-2.6.22/fs/open.c
@@ -407,6 +407,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;
next prev parent reply other threads:[~2007-07-13 12:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-13 12:38 [PATCH 0/6][TAKE7] fallocate system call Amit K. Arora
2007-07-13 12:46 ` [PATCH 1/6][TAKE7] manpage for fallocate Amit K. Arora
2007-07-13 14:06 ` David Chinner
2007-07-13 14:27 ` Amit K. Arora
2007-07-14 8:23 ` Michael Kerrisk
2007-07-16 5:32 ` Amit K. Arora
2007-07-13 12:47 ` [PATCH 2/6][TAKE7] fallocate() implementation in i386, x86_64 and powerpc Amit K. Arora
2007-07-13 13:21 ` Christoph Hellwig
2007-07-13 14:18 ` Amit K. Arora
2007-07-13 14:46 ` Christoph Hellwig
2007-07-13 12:48 ` Amit K. Arora [this message]
2007-07-13 13:21 ` [PATCH 3/6][TAKE7] revalidate write permissions for fallocate Christoph Hellwig
2007-07-13 14:28 ` Amit K. Arora
2007-07-13 12:50 ` [PATCH 4/6][TAKE7] ext4: fallocate support in ext4 Amit K. Arora
2007-07-13 12:52 ` [PATCH 5/6][TAKE7] ext4: write support for preallocated blocks Amit K. Arora
2007-07-13 12:52 ` [PATCH 6/6][TAKE7] ext4: change for better extent-to-group alignment Amit K. Arora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070713124847.GC22961@amitarora.in.ibm.com \
--to=aarora@linux.vnet.ibm.com \
--cc=adilger@clusterfs.com \
--cc=cmm@us.ibm.com \
--cc=dgc@sgi.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suparna@in.ibm.com \
--cc=tytso@mit.edu \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox