mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
Merge branch 'next-lsm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull capabilities update from James Morris: "Minor fixes for capabilities: - Update the commoncap.c code to utilize XATTR_SECURITY_PREFIX_LEN, from Carmeli tamir. - Make the capability hooks static, from Yue Haibing" * 'next-lsm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security/commoncap: Use xattr security prefix len security: Make capability_hooks static
This commit is contained in:
commit
9d22167f34
1 changed files with 3 additions and 3 deletions
|
@ -915,7 +915,7 @@ int cap_inode_setxattr(struct dentry *dentry, const char *name,
|
||||||
|
|
||||||
/* Ignore non-security xattrs */
|
/* Ignore non-security xattrs */
|
||||||
if (strncmp(name, XATTR_SECURITY_PREFIX,
|
if (strncmp(name, XATTR_SECURITY_PREFIX,
|
||||||
sizeof(XATTR_SECURITY_PREFIX) - 1) != 0)
|
XATTR_SECURITY_PREFIX_LEN) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -947,7 +947,7 @@ int cap_inode_removexattr(struct dentry *dentry, const char *name)
|
||||||
|
|
||||||
/* Ignore non-security xattrs */
|
/* Ignore non-security xattrs */
|
||||||
if (strncmp(name, XATTR_SECURITY_PREFIX,
|
if (strncmp(name, XATTR_SECURITY_PREFIX,
|
||||||
sizeof(XATTR_SECURITY_PREFIX) - 1) != 0)
|
XATTR_SECURITY_PREFIX_LEN) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (strcmp(name, XATTR_NAME_CAPS) == 0) {
|
if (strcmp(name, XATTR_NAME_CAPS) == 0) {
|
||||||
|
@ -1339,7 +1339,7 @@ int cap_mmap_file(struct file *file, unsigned long reqprot,
|
||||||
|
|
||||||
#ifdef CONFIG_SECURITY
|
#ifdef CONFIG_SECURITY
|
||||||
|
|
||||||
struct security_hook_list capability_hooks[] __lsm_ro_after_init = {
|
static struct security_hook_list capability_hooks[] __lsm_ro_after_init = {
|
||||||
LSM_HOOK_INIT(capable, cap_capable),
|
LSM_HOOK_INIT(capable, cap_capable),
|
||||||
LSM_HOOK_INIT(settime, cap_settime),
|
LSM_HOOK_INIT(settime, cap_settime),
|
||||||
LSM_HOOK_INIT(ptrace_access_check, cap_ptrace_access_check),
|
LSM_HOOK_INIT(ptrace_access_check, cap_ptrace_access_check),
|
||||||
|
|
Loading…
Add table
Reference in a new issue