aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/key.h')
-rw-r--r--include/linux/key.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/key.h b/include/linux/key.h
index 2c24ffaca86f..2bfbf88d2740 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -273,14 +273,22 @@ extern void key_fsuid_changed(struct task_struct *tsk);
273extern void key_fsgid_changed(struct task_struct *tsk); 273extern void key_fsgid_changed(struct task_struct *tsk);
274extern void key_init(void); 274extern void key_init(void);
275 275
276#define __install_session_keyring(tsk, keyring) \
277({ \
278 struct key *old_session = tsk->signal->session_keyring; \
279 tsk->signal->session_keyring = keyring; \
280 old_session; \
281})
282
276#else /* CONFIG_KEYS */ 283#else /* CONFIG_KEYS */
277 284
278#define key_validate(k) 0 285#define key_validate(k) 0
279#define key_serial(k) 0 286#define key_serial(k) 0
280#define key_get(k) NULL 287#define key_get(k) ({ NULL; })
281#define key_put(k) do { } while(0) 288#define key_put(k) do { } while(0)
282#define alloc_uid_keyring(u) 0 289#define alloc_uid_keyring(u) 0
283#define switch_uid_keyring(u) do { } while(0) 290#define switch_uid_keyring(u) do { } while(0)
291#define __install_session_keyring(t, k) ({ NULL; })
284#define copy_keys(f,t) 0 292#define copy_keys(f,t) 0
285#define copy_thread_group_keys(t) 0 293#define copy_thread_group_keys(t) 0
286#define exit_keys(t) do { } while(0) 294#define exit_keys(t) do { } while(0)