[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100224110903.GA18240@redhat.com>
Date: Wed, 24 Feb 2010 12:09:03 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Neil Horman <nhorman@...driver.com>
Cc: akpm@...ux-foundation.org, viro@...iv.linux.org.uk,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] supress uid comparison test if core output files are
pipes
On 02/22, Neil Horman wrote:
>
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -1987,8 +1987,9 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
> /*
> * Dont allow local users get cute and trick others to coredump
> * into their pre-created files:
> + * Note, this is not relevant for pipes
> */
> - if (inode->i_uid != current_fsuid())
> + if (!ispipe && (inode->i_uid != current_fsuid()))
> goto close_fail;
Ah. This is because the previous recursion-check moved create_write_pipe()
from current's context to kthread's context, right?
Looks like a right (and "must have") fix for recent -mm changes to me.
This also reminds me do_coredump() asks for cleanup. I'll try to redo/resend
my old cleanup patches on top of your changes.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists