From: Stephen Smalley Subject: Re: [PATCH 10/10] cr: lsm: restore file->f_security Date: Wed, 10 Jun 2009 09:54:50 -0400 Message-ID: <1244642090.20265.144.camel@localhost.localdomain> References: <20090610014412.GA5628@us.ibm.com> <20090610014704.GI5658@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090610014704.GI5658-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: David Howells , SELinux , Linux Containers , Alexey Dobriyan , Andrew Morgan List-Id: containers.vger.kernel.org On Tue, 2009-06-09 at 20:47 -0500, Serge E. Hallyn wrote: > file->f_cred is the cred of the task which opened it. file->f_security > can be separately set by the LSM. Checkpoint the file->f_security, > and at restart ask the LSM, using security_file_restore, based on the current > task's context and the checkpointed f_security, which f_security to apply (or > whether to refuse the restart altogether). > > For Smack, accept the checkpointed label if the restarting task has > CAP_MAC_ADMIN. > > For SELinux, I currently ignore the checkpointed label and call > file_alloc_security(). Do we want to have 'restore' permission for > class file? Yes - otherwise we'll end up with a restarted process that may not be able to access its open files. -- Stephen Smalley National Security Agency