aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/key.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-13 18:39:20 -0500
committerJames Morris <jmorris@namei.org>2008-11-13 18:39:20 -0500
commitbb952bb98a7e479262c7eb25d5592545a3af147d (patch)
tree9a2158c07a22a5fbddcec412944d2e7534eecc8f /include/linux/key.h
parent275bb41e9d058fbb327e7642f077e1beaeac162e (diff)
CRED: Separate per-task-group keyrings from signal_struct
Separate per-task-group keyrings from signal_struct and dangle their anchor from the cred struct rather than the signal_struct. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: James Morris <jmorris@namei.org> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux/key.h')
-rw-r--r--include/linux/key.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/key.h b/include/linux/key.h
index df709e1af3cd..0836cc838b0c 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -278,9 +278,7 @@ extern ctl_table key_sysctls[];
278 */ 278 */
279extern void switch_uid_keyring(struct user_struct *new_user); 279extern void switch_uid_keyring(struct user_struct *new_user);
280extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk); 280extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk);
281extern int copy_thread_group_keys(struct task_struct *tsk);
282extern void exit_keys(struct task_struct *tsk); 281extern void exit_keys(struct task_struct *tsk);
283extern void exit_thread_group_keys(struct signal_struct *tg);
284extern int suid_keys(struct task_struct *tsk); 282extern int suid_keys(struct task_struct *tsk);
285extern int exec_keys(struct task_struct *tsk); 283extern int exec_keys(struct task_struct *tsk);
286extern void key_fsuid_changed(struct task_struct *tsk); 284extern void key_fsuid_changed(struct task_struct *tsk);
@@ -289,8 +287,8 @@ extern void key_init(void);
289 287
290#define __install_session_keyring(keyring) \ 288#define __install_session_keyring(keyring) \
291({ \ 289({ \
292 struct key *old_session = current->signal->session_keyring; \ 290 struct key *old_session = current->cred->tgcred->session_keyring; \
293 current->signal->session_keyring = keyring; \ 291 current->cred->tgcred->session_keyring = keyring; \
294 old_session; \ 292 old_session; \
295}) 293})
296 294
@@ -308,9 +306,7 @@ extern void key_init(void);
308#define switch_uid_keyring(u) do { } while(0) 306#define switch_uid_keyring(u) do { } while(0)
309#define __install_session_keyring(k) ({ NULL; }) 307#define __install_session_keyring(k) ({ NULL; })
310#define copy_keys(f,t) 0 308#define copy_keys(f,t) 0
311#define copy_thread_group_keys(t) 0
312#define exit_keys(t) do { } while(0) 309#define exit_keys(t) do { } while(0)
313#define exit_thread_group_keys(tg) do { } while(0)
314#define suid_keys(t) do { } while(0) 310#define suid_keys(t) do { } while(0)
315#define exec_keys(t) do { } while(0) 311#define exec_keys(t) do { } while(0)
316#define key_fsuid_changed(t) do { } while(0) 312#define key_fsuid_changed(t) do { } while(0)