Skip to content

Commit b3816cf

Browse files
committed
lsm: fix a badly named parameter in security_get_getsecurity()
There is no good reason for why the "_buffer" parameter needs an underscore, get rid of it. Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 1e2523d commit b3816cf

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

include/linux/lsm_hook_defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ LSM_HOOK(int, 0, key_alloc, struct key *key, const struct cred *cred,
381381
LSM_HOOK(void, LSM_RET_VOID, key_free, struct key *key)
382382
LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
383383
enum key_need_perm need_perm)
384-
LSM_HOOK(int, 0, key_getsecurity, struct key *key, char **_buffer)
384+
LSM_HOOK(int, 0, key_getsecurity, struct key *key, char **buffer)
385385
#endif /* CONFIG_KEYS */
386386

387387
#ifdef CONFIG_AUDIT

security/security.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4981,20 +4981,20 @@ int security_key_permission(key_ref_t key_ref, const struct cred *cred,
49814981
/**
49824982
* security_key_getsecurity() - Get the key's security label
49834983
* @key: key
4984-
* @_buffer: security label buffer
4984+
* @buffer: security label buffer
49854985
*
49864986
* Get a textual representation of the security context attached to a key for
49874987
* the purposes of honouring KEYCTL_GETSECURITY. This function allocates the
49884988
* storage for the NUL-terminated string and the caller should free it.
49894989
*
4990-
* Return: Returns the length of @_buffer (including terminating NUL) or -ve if
4990+
* Return: Returns the length of @buffer (including terminating NUL) or -ve if
49914991
* an error occurs. May also return 0 (and a NULL buffer pointer) if
49924992
* there is no security label assigned to the key.
49934993
*/
4994-
int security_key_getsecurity(struct key *key, char **_buffer)
4994+
int security_key_getsecurity(struct key *key, char **buffer)
49954995
{
4996-
*_buffer = NULL;
4997-
return call_int_hook(key_getsecurity, 0, key, _buffer);
4996+
*buffer = NULL;
4997+
return call_int_hook(key_getsecurity, 0, key, buffer);
49984998
}
49994999
#endif /* CONFIG_KEYS */
50005000

0 commit comments

Comments
 (0)