diff options
author | David Howells <dhowells@redhat.com> | 2005-10-30 18:02:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:23 -0500 |
commit | 29db9190634067c5a328ee5fcc2890251b836b4b (patch) | |
tree | 07ec242789230824f1fa8bcbbe681fd5bf166fa8 /Documentation/keys.txt | |
parent | 2aa349f6e37ce030060c994d3aebbff4ab703565 (diff) |
[PATCH] Keys: Add LSM hooks for key management [try #3]
The attached patch adds LSM hooks for key management facilities. The notable
changes are:
(1) The key struct now supports a security pointer for the use of security
modules. This will permit key labelling and restrictions on which
programs may access a key.
(2) Security modules get a chance to note (or abort) the allocation of a key.
(3) The key permission checking can now be enhanced by the security modules;
the permissions check consults LSM if all other checks bear out.
(4) The key permissions checking functions now return an error code rather
than a boolean value.
(5) An extra permission has been added to govern the modification of
attributes (UID, GID, permissions).
Note that there isn't an LSM hook specifically for each keyctl() operation,
but rather the permissions hook allows control of individual operations based
on the permission request bits.
Key management access control through LSM is enabled by automatically if both
CONFIG_KEYS and CONFIG_SECURITY are enabled.
This should be applied on top of the patch ensubjected:
[PATCH] Keys: Possessor permissions should be additive
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/keys.txt')
-rw-r--r-- | Documentation/keys.txt | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Documentation/keys.txt b/Documentation/keys.txt index 4afe03a58c5b..31154882000a 100644 --- a/Documentation/keys.txt +++ b/Documentation/keys.txt | |||
@@ -196,7 +196,7 @@ KEY ACCESS PERMISSIONS | |||
196 | 196 | ||
197 | Keys have an owner user ID, a group access ID, and a permissions mask. The mask | 197 | Keys have an owner user ID, a group access ID, and a permissions mask. The mask |
198 | has up to eight bits each for possessor, user, group and other access. Only | 198 | has up to eight bits each for possessor, user, group and other access. Only |
199 | five of each set of eight bits are defined. These permissions granted are: | 199 | six of each set of eight bits are defined. These permissions granted are: |
200 | 200 | ||
201 | (*) View | 201 | (*) View |
202 | 202 | ||
@@ -224,6 +224,10 @@ five of each set of eight bits are defined. These permissions granted are: | |||
224 | keyring to a key, a process must have Write permission on the keyring and | 224 | keyring to a key, a process must have Write permission on the keyring and |
225 | Link permission on the key. | 225 | Link permission on the key. |
226 | 226 | ||
227 | (*) Set Attribute | ||
228 | |||
229 | This permits a key's UID, GID and permissions mask to be changed. | ||
230 | |||
227 | For changing the ownership, group ID or permissions mask, being the owner of | 231 | For changing the ownership, group ID or permissions mask, being the owner of |
228 | the key or having the sysadmin capability is sufficient. | 232 | the key or having the sysadmin capability is sufficient. |
229 | 233 | ||
@@ -242,15 +246,15 @@ about the status of the key service: | |||
242 | this way: | 246 | this way: |
243 | 247 | ||
244 | SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY | 248 | SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY |
245 | 00000001 I----- 39 perm 1f1f0000 0 0 keyring _uid_ses.0: 1/4 | 249 | 00000001 I----- 39 perm 1f3f0000 0 0 keyring _uid_ses.0: 1/4 |
246 | 00000002 I----- 2 perm 1f1f0000 0 0 keyring _uid.0: empty | 250 | 00000002 I----- 2 perm 1f3f0000 0 0 keyring _uid.0: empty |
247 | 00000007 I----- 1 perm 1f1f0000 0 0 keyring _pid.1: empty | 251 | 00000007 I----- 1 perm 1f3f0000 0 0 keyring _pid.1: empty |
248 | 0000018d I----- 1 perm 1f1f0000 0 0 keyring _pid.412: empty | 252 | 0000018d I----- 1 perm 1f3f0000 0 0 keyring _pid.412: empty |
249 | 000004d2 I--Q-- 1 perm 1f1f0000 32 -1 keyring _uid.32: 1/4 | 253 | 000004d2 I--Q-- 1 perm 1f3f0000 32 -1 keyring _uid.32: 1/4 |
250 | 000004d3 I--Q-- 3 perm 1f1f0000 32 -1 keyring _uid_ses.32: empty | 254 | 000004d3 I--Q-- 3 perm 1f3f0000 32 -1 keyring _uid_ses.32: empty |
251 | 00000892 I--QU- 1 perm 1f000000 0 0 user metal:copper: 0 | 255 | 00000892 I--QU- 1 perm 1f000000 0 0 user metal:copper: 0 |
252 | 00000893 I--Q-N 1 35s 1f1f0000 0 0 user metal:silver: 0 | 256 | 00000893 I--Q-N 1 35s 1f3f0000 0 0 user metal:silver: 0 |
253 | 00000894 I--Q-- 1 10h 001f0000 0 0 user metal:gold: 0 | 257 | 00000894 I--Q-- 1 10h 003f0000 0 0 user metal:gold: 0 |
254 | 258 | ||
255 | The flags are: | 259 | The flags are: |
256 | 260 | ||