diff options
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index 1b70e35a71e3..21d32a142c00 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -73,6 +73,7 @@ struct key; | |||
73 | struct seq_file; | 73 | struct seq_file; |
74 | struct user_struct; | 74 | struct user_struct; |
75 | struct signal_struct; | 75 | struct signal_struct; |
76 | struct cred; | ||
76 | 77 | ||
77 | struct key_type; | 78 | struct key_type; |
78 | struct key_owner; | 79 | struct key_owner; |
@@ -181,7 +182,7 @@ struct key { | |||
181 | extern struct key *key_alloc(struct key_type *type, | 182 | extern struct key *key_alloc(struct key_type *type, |
182 | const char *desc, | 183 | const char *desc, |
183 | uid_t uid, gid_t gid, | 184 | uid_t uid, gid_t gid, |
184 | struct task_struct *ctx, | 185 | const struct cred *cred, |
185 | key_perm_t perm, | 186 | key_perm_t perm, |
186 | unsigned long flags); | 187 | unsigned long flags); |
187 | 188 | ||
@@ -249,7 +250,7 @@ extern int key_unlink(struct key *keyring, | |||
249 | struct key *key); | 250 | struct key *key); |
250 | 251 | ||
251 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | 252 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, |
252 | struct task_struct *ctx, | 253 | const struct cred *cred, |
253 | unsigned long flags, | 254 | unsigned long flags, |
254 | struct key *dest); | 255 | struct key *dest); |
255 | 256 | ||
@@ -276,24 +277,11 @@ extern ctl_table key_sysctls[]; | |||
276 | /* | 277 | /* |
277 | * the userspace interface | 278 | * the userspace interface |
278 | */ | 279 | */ |
279 | extern void switch_uid_keyring(struct user_struct *new_user); | 280 | extern int install_thread_keyring_to_cred(struct cred *cred); |
280 | extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk); | ||
281 | extern int copy_thread_group_keys(struct task_struct *tsk); | ||
282 | extern void exit_keys(struct task_struct *tsk); | ||
283 | extern void exit_thread_group_keys(struct signal_struct *tg); | ||
284 | extern int suid_keys(struct task_struct *tsk); | ||
285 | extern int exec_keys(struct task_struct *tsk); | ||
286 | extern void key_fsuid_changed(struct task_struct *tsk); | 281 | extern void key_fsuid_changed(struct task_struct *tsk); |
287 | extern void key_fsgid_changed(struct task_struct *tsk); | 282 | extern void key_fsgid_changed(struct task_struct *tsk); |
288 | extern void key_init(void); | 283 | extern void key_init(void); |
289 | 284 | ||
290 | #define __install_session_keyring(tsk, keyring) \ | ||
291 | ({ \ | ||
292 | struct key *old_session = tsk->signal->session_keyring; \ | ||
293 | tsk->signal->session_keyring = keyring; \ | ||
294 | old_session; \ | ||
295 | }) | ||
296 | |||
297 | #else /* CONFIG_KEYS */ | 285 | #else /* CONFIG_KEYS */ |
298 | 286 | ||
299 | #define key_validate(k) 0 | 287 | #define key_validate(k) 0 |
@@ -302,17 +290,9 @@ extern void key_init(void); | |||
302 | #define key_revoke(k) do { } while(0) | 290 | #define key_revoke(k) do { } while(0) |
303 | #define key_put(k) do { } while(0) | 291 | #define key_put(k) do { } while(0) |
304 | #define key_ref_put(k) do { } while(0) | 292 | #define key_ref_put(k) do { } while(0) |
305 | #define make_key_ref(k, p) ({ NULL; }) | 293 | #define make_key_ref(k, p) NULL |
306 | #define key_ref_to_ptr(k) ({ NULL; }) | 294 | #define key_ref_to_ptr(k) NULL |
307 | #define is_key_possessed(k) 0 | 295 | #define is_key_possessed(k) 0 |
308 | #define switch_uid_keyring(u) do { } while(0) | ||
309 | #define __install_session_keyring(t, k) ({ NULL; }) | ||
310 | #define copy_keys(f,t) 0 | ||
311 | #define copy_thread_group_keys(t) 0 | ||
312 | #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) | ||
315 | #define exec_keys(t) do { } while(0) | ||
316 | #define key_fsuid_changed(t) do { } while(0) | 296 | #define key_fsuid_changed(t) do { } while(0) |
317 | #define key_fsgid_changed(t) do { } while(0) | 297 | #define key_fsgid_changed(t) do { } while(0) |
318 | #define key_init() do { } while(0) | 298 | #define key_init() do { } while(0) |