Re: [PATCH 2/3] CRED: Split the task security data and move part of it into struct cred

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Smalley
Date: Monday, September 24, 2007 - 7:21 am

On Mon, 2007-09-24 at 09:00 -0500, Serge E. Hallyn wrote:

I think that's why they want it - so that things like nfsd and
cachefiles can switch the credentials used for permission checking and
object labeling (actor_sid, fscreate_sid) without exposing them to
access by other tasks via signals, ptrace, etc (victim_sid).  Similar to
fsuid vs. uid.  And then the separate issue of migrating the permission
checking and object labeling state into a separate credential structure
that can have a separate lifecycle from the task.

Precisely when to use one identity vs. the other though isn't always
clear, and the potential for accidental divergence is also a concern.

I think it is a mistake to have selinux_get_task_sid() blindly return
the victim SID btw.  I think you likely need to split that interface and
require the caller to indicate what it wants, so that there is no
accidental misuse of the victim SID where the caller wanted the actor
SID.  Or at least rename that interface to make it clear that it only
returns the victim SID.

-- 
Stephen Smalley
National Security Agency

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] Introduce credential record, David Howells, (Wed Sep 19, 9:17 am)
[PATCH 1/3] CRED: Introduce a COW credentials record, David Howells, (Wed Sep 19, 9:17 am)
Re: [PATCH 2/3] CRED: Split the task security data and mov ..., Stephen Smalley, (Mon Sep 24, 7:21 am)