mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
committed by
James Morris
parent
275bb41e9d
commit
bb952bb98a
@@ -278,9 +278,7 @@ extern ctl_table key_sysctls[];
|
||||
*/
|
||||
extern void switch_uid_keyring(struct user_struct *new_user);
|
||||
extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk);
|
||||
extern int copy_thread_group_keys(struct task_struct *tsk);
|
||||
extern void exit_keys(struct task_struct *tsk);
|
||||
extern void exit_thread_group_keys(struct signal_struct *tg);
|
||||
extern int suid_keys(struct task_struct *tsk);
|
||||
extern int exec_keys(struct task_struct *tsk);
|
||||
extern void key_fsuid_changed(struct task_struct *tsk);
|
||||
@@ -289,8 +287,8 @@ extern void key_init(void);
|
||||
|
||||
#define __install_session_keyring(keyring) \
|
||||
({ \
|
||||
struct key *old_session = current->signal->session_keyring; \
|
||||
current->signal->session_keyring = keyring; \
|
||||
struct key *old_session = current->cred->tgcred->session_keyring; \
|
||||
current->cred->tgcred->session_keyring = keyring; \
|
||||
old_session; \
|
||||
})
|
||||
|
||||
@@ -308,9 +306,7 @@ extern void key_init(void);
|
||||
#define switch_uid_keyring(u) do { } while(0)
|
||||
#define __install_session_keyring(k) ({ NULL; })
|
||||
#define copy_keys(f,t) 0
|
||||
#define copy_thread_group_keys(t) 0
|
||||
#define exit_keys(t) do { } while(0)
|
||||
#define exit_thread_group_keys(tg) do { } while(0)
|
||||
#define suid_keys(t) do { } while(0)
|
||||
#define exec_keys(t) do { } while(0)
|
||||
#define key_fsuid_changed(t) do { } while(0)
|
||||
|
||||
Reference in New Issue
Block a user