diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 18:40:50 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 18:40:50 -0500 |
| commit | 2a74dbb9a86e8102dcd07d284135b4530a84826e (patch) | |
| tree | a54403e312b6062dfb57bd904ba8b8ce3b11e720 /include/linux | |
| parent | 770b6cb4d21fb3e3df2a7a51e186a3c14db1ec30 (diff) | |
| parent | e93072374112db9dc86635934ee761249be28370 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"A quiet cycle for the security subsystem with just a few maintenance
updates."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
Smack: create a sysfs mount point for smackfs
Smack: use select not depends in Kconfig
Yama: remove locking from delete path
Yama: add RCU to drop read locking
drivers/char/tpm: remove tasklet and cleanup
KEYS: Use keyring_alloc() to create special keyrings
KEYS: Reduce initial permissions on keys
KEYS: Make the session and process keyrings per-thread
seccomp: Make syscall skipping and nr changes more consistent
key: Fix resource leak
keys: Fix unreachable code
KEYS: Add payload preparsing opportunity prior to key instantiate or update
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cred.h | 17 | ||||
| -rw-r--r-- | include/linux/key.h | 1 |
2 files changed, 3 insertions, 15 deletions
diff --git a/include/linux/cred.h b/include/linux/cred.h index ebbed2ce6637..0142aacb70b7 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -77,21 +77,6 @@ extern int in_group_p(kgid_t); | |||
| 77 | extern int in_egroup_p(kgid_t); | 77 | extern int in_egroup_p(kgid_t); |
| 78 | 78 | ||
| 79 | /* | 79 | /* |
| 80 | * The common credentials for a thread group | ||
| 81 | * - shared by CLONE_THREAD | ||
| 82 | */ | ||
| 83 | #ifdef CONFIG_KEYS | ||
| 84 | struct thread_group_cred { | ||
| 85 | atomic_t usage; | ||
| 86 | pid_t tgid; /* thread group process ID */ | ||
| 87 | spinlock_t lock; | ||
| 88 | struct key __rcu *session_keyring; /* keyring inherited over fork */ | ||
| 89 | struct key *process_keyring; /* keyring private to this process */ | ||
| 90 | struct rcu_head rcu; /* RCU deletion hook */ | ||
| 91 | }; | ||
| 92 | #endif | ||
| 93 | |||
| 94 | /* | ||
| 95 | * The security context of a task | 80 | * The security context of a task |
| 96 | * | 81 | * |
| 97 | * The parts of the context break down into two categories: | 82 | * The parts of the context break down into two categories: |
| @@ -139,6 +124,8 @@ struct cred { | |||
| 139 | #ifdef CONFIG_KEYS | 124 | #ifdef CONFIG_KEYS |
| 140 | unsigned char jit_keyring; /* default keyring to attach requested | 125 | unsigned char jit_keyring; /* default keyring to attach requested |
| 141 | * keys to */ | 126 | * keys to */ |
| 127 | struct key __rcu *session_keyring; /* keyring inherited over fork */ | ||
| 128 | struct key *process_keyring; /* keyring private to this process */ | ||
| 142 | struct key *thread_keyring; /* keyring private to this thread */ | 129 | struct key *thread_keyring; /* keyring private to this thread */ |
| 143 | struct key *request_key_auth; /* assumed request_key authority */ | 130 | struct key *request_key_auth; /* assumed request_key authority */ |
| 144 | struct thread_group_cred *tgcred; /* thread-group shared credentials */ | 131 | struct thread_group_cred *tgcred; /* thread-group shared credentials */ |
diff --git a/include/linux/key.h b/include/linux/key.h index 2393b1c040b6..4dfde1161c5e 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -265,6 +265,7 @@ extern int key_unlink(struct key *keyring, | |||
| 265 | 265 | ||
| 266 | extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid, | 266 | extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid, |
| 267 | const struct cred *cred, | 267 | const struct cred *cred, |
| 268 | key_perm_t perm, | ||
| 268 | unsigned long flags, | 269 | unsigned long flags, |
| 269 | struct key *dest); | 270 | struct key *dest); |
| 270 | 271 | ||
