linux/security
David Howells 3b11a1dece CRED: Differentiate objective and effective subjective credentials on a task
Differentiate the objective and real subjective credentials from the effective
subjective credentials on a task by introducing a second credentials pointer
into the task_struct.

task_struct::real_cred then refers to the objective and apparent real
subjective credentials of a task, as perceived by the other tasks in the
system.

task_struct::cred then refers to the effective subjective credentials of a
task, as used by that task when it's actually running.  These are not visible
to the other tasks in the system.

__task_cred(task) then refers to the objective/real credentials of the task in
question.

current_cred() refers to the effective subjective credentials of the current
task.

prepare_creds() uses the objective creds as a base and commit_creds() changes
both pointers in the task_struct (indeed commit_creds() requires them to be the
same).

override_creds() and revert_creds() change the subjective creds pointer only,
and the former returns the old subjective creds.  These are used by NFSD,
faccessat() and do_coredump(), and will by used by CacheFiles.

In SELinux, current_has_perm() is provided as an alternative to
task_has_perm().  This uses the effective subjective context of current,
whereas task_has_perm() uses the objective/real context of the subject.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
2008-11-14 10:39:26 +11:00
..
keys CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00
selinux CRED: Differentiate objective and effective subjective credentials on a task 2008-11-14 10:39:26 +11:00
smack CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00
capability.c CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00
commoncap.c CRED: Prettify commoncap.c 2008-11-14 10:39:24 +11:00
device_cgroup.c devcgroup: remove spin_lock() 2008-10-20 08:52:38 -07:00
inode.c integrity: special fs magic 2008-10-13 09:47:43 +11:00
Kconfig securityfs: do not depend on CONFIG_SECURITY 2008-08-28 10:47:42 +10:00
Makefile securityfs: do not depend on CONFIG_SECURITY 2008-08-28 10:47:42 +10:00
root_plug.c CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00
security.c CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00