diff options
Diffstat (limited to 'security/keys/keyctl.c')
| -rw-r--r-- | security/keys/keyctl.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 09796797d122..b1ec3b4ee17d 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
| @@ -54,11 +54,11 @@ static int key_get_type_from_user(char *type, | |||
| 54 | * - returns the new key's serial number | 54 | * - returns the new key's serial number |
| 55 | * - implements add_key() | 55 | * - implements add_key() |
| 56 | */ | 56 | */ |
| 57 | asmlinkage long sys_add_key(const char __user *_type, | 57 | SYSCALL_DEFINE5(add_key, const char __user *, _type, |
| 58 | const char __user *_description, | 58 | const char __user *, _description, |
| 59 | const void __user *_payload, | 59 | const void __user *, _payload, |
| 60 | size_t plen, | 60 | size_t, plen, |
| 61 | key_serial_t ringid) | 61 | key_serial_t, ringid) |
| 62 | { | 62 | { |
| 63 | key_ref_t keyring_ref, key_ref; | 63 | key_ref_t keyring_ref, key_ref; |
| 64 | char type[32], *description; | 64 | char type[32], *description; |
| @@ -146,10 +146,10 @@ asmlinkage long sys_add_key(const char __user *_type, | |||
| 146 | * - if the _callout_info string is empty, it will be rendered as "-" | 146 | * - if the _callout_info string is empty, it will be rendered as "-" |
| 147 | * - implements request_key() | 147 | * - implements request_key() |
| 148 | */ | 148 | */ |
| 149 | asmlinkage long sys_request_key(const char __user *_type, | 149 | SYSCALL_DEFINE4(request_key, const char __user *, _type, |
| 150 | const char __user *_description, | 150 | const char __user *, _description, |
| 151 | const char __user *_callout_info, | 151 | const char __user *, _callout_info, |
| 152 | key_serial_t destringid) | 152 | key_serial_t, destringid) |
| 153 | { | 153 | { |
| 154 | struct key_type *ktype; | 154 | struct key_type *ktype; |
| 155 | struct key *key; | 155 | struct key *key; |
| @@ -270,6 +270,7 @@ long keyctl_join_session_keyring(const char __user *_name) | |||
| 270 | 270 | ||
| 271 | /* join the session */ | 271 | /* join the session */ |
| 272 | ret = join_session_keyring(name); | 272 | ret = join_session_keyring(name); |
| 273 | kfree(name); | ||
| 273 | 274 | ||
| 274 | error: | 275 | error: |
| 275 | return ret; | 276 | return ret; |
| @@ -1216,8 +1217,8 @@ long keyctl_get_security(key_serial_t keyid, | |||
| 1216 | /* | 1217 | /* |
| 1217 | * the key control system call | 1218 | * the key control system call |
| 1218 | */ | 1219 | */ |
| 1219 | asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3, | 1220 | SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3, |
| 1220 | unsigned long arg4, unsigned long arg5) | 1221 | unsigned long, arg4, unsigned long, arg5) |
| 1221 | { | 1222 | { |
| 1222 | switch (option) { | 1223 | switch (option) { |
| 1223 | case KEYCTL_GET_KEYRING_ID: | 1224 | case KEYCTL_GET_KEYRING_ID: |
