internal.h (4a38e122e2cc6294779021ff4ccc784a3997059e) | internal.h (70a5bb72b55e82fbfbf1e22cae6975fac58a1e2d) |
---|---|
1/* internal.h: authentication token and access key management internal defs 2 * 3 * Copyright (C) 2003-5, 2007 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 141 unchanged lines hidden (view full) --- 150extern long keyctl_chown_key(key_serial_t, uid_t, gid_t); 151extern long keyctl_setperm_key(key_serial_t, key_perm_t); 152extern long keyctl_instantiate_key(key_serial_t, const void __user *, 153 size_t, key_serial_t); 154extern long keyctl_negate_key(key_serial_t, unsigned, key_serial_t); 155extern long keyctl_set_reqkey_keyring(int); 156extern long keyctl_set_timeout(key_serial_t, unsigned); 157extern long keyctl_assume_authority(key_serial_t); | 1/* internal.h: authentication token and access key management internal defs 2 * 3 * Copyright (C) 2003-5, 2007 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 141 unchanged lines hidden (view full) --- 150extern long keyctl_chown_key(key_serial_t, uid_t, gid_t); 151extern long keyctl_setperm_key(key_serial_t, key_perm_t); 152extern long keyctl_instantiate_key(key_serial_t, const void __user *, 153 size_t, key_serial_t); 154extern long keyctl_negate_key(key_serial_t, unsigned, key_serial_t); 155extern long keyctl_set_reqkey_keyring(int); 156extern long keyctl_set_timeout(key_serial_t, unsigned); 157extern long keyctl_assume_authority(key_serial_t); |
158extern long keyctl_get_security(key_serial_t keyid, char __user *buffer, 159 size_t buflen); |
|
158 | 160 |
159 | |
160/* 161 * debugging key validation 162 */ 163#ifdef KEY_DEBUGGING 164extern void __key_check(const struct key *); 165 166static inline void key_check(const struct key *key) 167{ 168 if (key && (IS_ERR(key) || key->magic != KEY_DEBUG_MAGIC)) 169 __key_check(key); 170} 171 172#else 173 174#define key_check(key) do {} while(0) 175 176#endif 177 178#endif /* _INTERNAL_H */ | 161/* 162 * debugging key validation 163 */ 164#ifdef KEY_DEBUGGING 165extern void __key_check(const struct key *); 166 167static inline void key_check(const struct key *key) 168{ 169 if (key && (IS_ERR(key) || key->magic != KEY_DEBUG_MAGIC)) 170 __key_check(key); 171} 172 173#else 174 175#define key_check(key) do {} while(0) 176 177#endif 178 179#endif /* _INTERNAL_H */ |