mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Amit K. Arora" <aarora@linux.vnet.ibm.com>
To: David Patrick Quigley <dpquigl@tycho.nsa.gov>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	eparis@redhat.com, jmorris@namei.org, sds@tycho.nsa.gov
Subject: Re: [PATCH 2/7] fallocate() implementation in i386, x86_64 and powerpc
Date: Thu, 12 Jul 2007 18:39:10 +0530	[thread overview]
Message-ID: <20070712130910.GB21606@amitarora.in.ibm.com> (raw)
In-Reply-To: <1184244990.18175.6.camel@moss-terrapins.epoch.ncsc.mil>

On Thu, Jul 12, 2007 at 08:56:30AM -0400, David Patrick Quigley wrote:
> 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.

Thanks for your patch! Will include it in the patchset.

--
Regards,
Amit Arora
> 
> Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov>
> 
> 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.c	2007-07-11 15:51:10.000000000 -0400
> +++ linux-2.6.22-fallocate-selinux/fs/open.c	2007-07-11 16:10:43.000000000 -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;

  reply	other threads:[~2007-07-12 13:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10 20:12 [PATCH 0/7][TAKE6] fallocate system call Amit K. Arora
2007-07-10 20:18 ` [PATCH 1/7] manpage for fallocate Amit K. Arora
2007-07-10 21:37   ` Heikki Orsila
2007-07-11  9:12     ` Amit K. Arora
2007-07-11  1:37   ` Barry Naujok
2007-07-10 20:20 ` [PATCH 2/7] fallocate() implementation in i386, x86_64 and powerpc Amit K. Arora
2007-07-11  2:10   ` Stephen Rothwell
2007-07-11  4:59     ` Heiko Carstens
2007-07-11  8:11     ` Amit K. Arora
2007-07-12 12:56   ` David Patrick Quigley
2007-07-12 13:09     ` Amit K. Arora [this message]
2007-07-12 13:15     ` James Morris
2007-07-10 20:21 ` [PATCH 3/7] support new modes in fallocate Amit K. Arora
2007-07-10 20:22 ` [PATCH 4/7] ext4: fallocate support in ext4 Amit K. Arora
2007-07-10 20:23 ` [PATCH 5/7] ext4: write support for preallocated blocks Amit K. Arora
2007-07-10 20:24 ` [PATCH 6/7] ext4: support new modes in ext4 Amit K. Arora
2007-07-10 20:26 ` [PATCH 7/7] 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=20070712130910.GB21606@amitarora.in.ibm.com \
    --to=aarora@linux.vnet.ibm.com \
    --cc=dpquigl@tycho.nsa.gov \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    /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

all inboxes | Powered by JetHome®