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
..
2008-10-20 08:52:40 -07:00
2008-10-17 17:15:43 -03:00
2008-10-22 01:19:37 +02:00
2008-10-19 22:54:12 +02:00
2008-10-22 15:38:42 -07:00
2008-10-12 11:04:34 +02:00
2008-10-20 09:03:12 -07:00
2008-10-14 11:58:31 -07:00
2008-10-21 13:25:28 +11:00
2008-10-13 21:51:51 +01:00
2008-10-30 11:38:47 -07:00
2008-10-15 15:54:56 -04:00
2008-10-20 16:07:19 +01:00
2008-10-10 23:50:21 -04:00
2008-10-20 11:01:52 -07:00
2008-10-16 11:21:51 -07:00
2008-10-10 22:39:31 +02:00
2008-11-14 10:39:24 +11:00
2008-10-16 11:21:39 -07:00
2008-10-16 11:21:39 -07:00
2008-10-20 08:50:25 -07:00
2008-10-20 08:52:42 -07:00
2008-11-14 10:39:24 +11:00
2008-10-17 09:29:55 -07:00
2008-10-23 08:20:34 -07:00
2008-10-21 07:48:52 -04:00
2008-10-17 08:46:57 +02:00
2008-10-20 08:52:32 -07:00
2008-11-14 10:39:23 +11:00
2008-10-21 07:47:22 -04:00
2008-10-20 08:52:34 -07:00
2008-10-30 11:38:45 -07:00
2008-10-16 11:21:32 -07:00
2008-10-16 11:21:33 -07:00
2008-10-14 10:35:08 +02:00
2008-10-14 12:12:02 -07:00
2008-10-09 13:52:43 -04:00
2008-10-23 18:51:22 +04:00
2008-11-14 10:39:26 +11:00
2008-10-23 05:13:16 -04:00
2008-10-23 10:23:07 -07:00
2008-10-22 20:21:31 +02:00
2008-10-13 09:51:43 -07:00
2008-10-21 17:45:06 +01:00
2008-10-18 14:29:15 +01:00
2008-10-16 16:53:04 +02:00
2008-10-13 16:05:06 +01:00
2008-10-15 12:46:51 +01:00
2008-10-16 09:24:47 -07:00
2008-10-16 16:53:13 +02:00
2008-10-09 08:56:13 +02:00
2008-10-12 12:05:55 +02:00
2008-10-16 11:21:30 -07:00
2008-10-20 08:52:37 -07:00
2008-10-16 11:21:30 -07:00
2008-10-20 08:52:36 -07:00
2008-10-09 08:56:19 +02:00
2008-10-21 07:47:06 -04:00
2008-10-15 22:21:11 +02:00
2008-10-30 11:38:45 -07:00
2008-11-14 10:39:25 +11:00
2008-10-31 00:59:46 -04:00
2008-10-21 07:47:06 -04:00
2008-10-23 16:00:24 +02:00
2008-10-16 16:08:57 +02:00
2008-10-23 17:57:37 +04:00
2008-10-16 11:21:40 -07:00
2008-10-27 15:06:01 +01:00
2008-10-14 23:51:02 +02:00
2008-10-22 09:48:06 +02:00
2008-10-23 13:52:40 +04:00
2008-10-22 20:21:30 +02:00
2008-10-17 17:25:11 -03:00
2008-10-22 20:21:33 +02:00
2008-10-16 11:21:38 -07:00
2008-10-24 12:54:18 -04:00
2008-10-15 16:03:01 -07:00
2008-10-21 07:47:30 -04:00
2008-10-13 19:01:08 -07:00
2008-10-13 19:01:08 -07:00
2008-10-13 19:01:08 -07:00
2008-10-09 11:59:55 -07:00
2008-10-13 19:01:08 -07:00
2008-11-14 10:39:26 +11:00
2008-10-29 22:02:09 +01:00
2008-10-18 14:29:15 +01:00
2008-10-20 13:23:01 -07:00
2008-11-03 18:21:45 +01:00
2008-10-16 11:21:33 -07:00
2008-10-16 15:17:40 -07:00
2008-10-15 14:24:08 +02:00
2008-10-18 14:05:18 +02:00
2008-10-21 15:54:40 +02:00
2008-10-12 09:37:01 -02:00
2008-10-16 20:00:24 -04:00
2008-10-23 08:55:01 -07:00
2008-10-16 11:21:32 -07:00
2008-10-16 11:21:31 -07:00
2008-10-20 08:52:40 -07:00
2008-10-20 13:23:01 -07:00
2008-10-30 11:38:47 -07:00
2008-11-14 10:39:24 +11:00
2008-11-14 10:39:14 +11:00
2008-10-09 08:56:04 +02:00
2008-10-16 11:21:29 -07:00
2008-10-14 10:34:22 +02:00
2008-10-28 14:21:34 +02:00
2008-10-28 14:22:15 +02:00
2008-10-20 22:34:12 +01:00
2008-11-04 01:08:27 -05:00
2008-10-14 10:35:08 +02:00
2008-10-13 09:47:43 +11:00
2008-10-09 08:56:06 +02:00
2008-10-10 23:16:16 -04:00
2008-10-14 10:39:28 +02:00
2008-10-20 08:52:39 -07:00
2008-10-20 08:50:25 -07:00
2008-10-20 08:52:31 -07:00
2008-10-20 08:52:39 -07:00
2008-10-20 08:52:30 -07:00
2008-10-14 10:37:17 +02:00
2008-10-20 08:52:39 -07:00
2008-10-29 00:51:25 +01:00
2008-10-22 10:00:23 +11:00
2008-10-22 10:00:23 +11:00
2008-10-16 11:21:30 -07:00
2008-10-23 05:13:20 -04:00
2008-10-30 23:54:35 -07:00
2008-10-17 13:06:45 -04:00
2008-10-14 19:23:17 -04:00
2008-10-13 10:55:47 +11:00
2008-10-21 15:17:48 +11:00
2008-10-23 08:55:02 -07:00
2008-10-20 08:52:30 -07:00
2008-10-20 08:52:32 -07:00
2008-10-20 08:50:26 -07:00
2008-10-16 11:21:49 -07:00
2008-10-13 10:10:37 -07:00
2008-10-22 16:42:43 -07:00
2008-10-23 10:20:36 -07:00
2008-10-22 16:42:35 -07:00
2008-10-23 14:54:18 -07:00
2008-10-26 23:07:25 -07:00
2008-10-16 11:21:48 -07:00
2008-10-16 09:24:51 -07:00
2008-10-16 11:21:30 -07:00
2008-10-23 00:11:07 -04:00
2008-10-23 18:54:05 +04:00
2008-10-23 08:55:01 -07:00
2008-10-20 08:52:39 -07:00
2008-10-16 11:21:46 -07:00
2008-10-16 11:21:46 -07:00
2008-10-21 07:49:04 -04:00
2008-10-16 11:21:30 -07:00
2008-10-30 11:38:45 -07:00
2008-10-14 10:39:05 +02:00
2008-10-20 08:52:40 -07:00
2008-10-16 11:21:30 -07:00
2008-11-14 10:39:26 +11:00
2008-11-14 10:39:18 +11:00
2008-11-14 10:39:24 +11:00
2008-10-20 08:52:39 -07:00
2008-10-13 09:51:39 -07:00
2008-10-13 09:51:40 -07:00
2008-10-23 15:20:06 +04:00
2008-10-22 07:00:38 -04:00
2008-10-17 08:46:56 +02:00
2008-11-02 10:15:07 -08:00
2008-10-20 08:52:40 -07:00
2008-10-20 08:52:31 -07:00
2008-10-16 11:21:28 -07:00
2008-10-16 11:21:47 -07:00
2008-10-20 08:52:42 -07:00
2008-10-16 11:21:32 -07:00
2008-10-16 11:21:45 -07:00
2008-10-13 09:51:40 -07:00
2008-10-17 18:13:38 +02:00
2008-10-22 09:48:06 +02:00
2008-10-14 10:39:31 +02:00
2008-10-13 09:51:43 -07:00
2008-10-13 09:51:44 -07:00
2008-10-21 07:47:06 -04:00
2008-10-17 14:41:02 -07:00
2008-10-21 14:31:15 -02:00
2008-10-23 15:48:28 +04:00
2008-10-23 17:35:04 +04:00
2008-10-13 09:51:42 -07:00
2008-10-16 11:21:31 -07:00
2008-10-22 10:00:25 +11:00
2008-10-16 10:09:17 -04:00