2019-03-29 14:12:17 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-11-06 04:14:04 +08:00
|
|
|
From: Casey Schaufler <casey.schaufler@intel.com>
|
|
|
|
Date: Fri, 7 Sep 2018 12:21:46 -0700
|
2019-03-29 14:12:17 +08:00
|
|
|
Subject: [PATCH] LSM: Fix secid initialization in security.h
|
2018-11-06 04:14:04 +08:00
|
|
|
|
|
|
|
The secid initialization for the case where security
|
|
|
|
modules are disabled uses a non-existent field.
|
|
|
|
Correct the code to use a field that exists.
|
|
|
|
|
|
|
|
Signed-off-by: Casey Schaufler <casey.schaufler@intel.com>
|
|
|
|
---
|
|
|
|
include/linux/security.h | 6 +++---
|
|
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/include/linux/security.h b/include/linux/security.h
|
2019-03-29 14:12:17 +08:00
|
|
|
index 35f08a8..5324f52 100644
|
2018-11-06 04:14:04 +08:00
|
|
|
--- a/include/linux/security.h
|
|
|
|
+++ b/include/linux/security.h
|
|
|
|
@@ -875,7 +875,7 @@ static inline int security_inode_listsecurity(struct inode *inode, char *buffer,
|
|
|
|
static inline void security_inode_getsecid(struct inode *inode,
|
|
|
|
struct secids *secid)
|
|
|
|
{
|
|
|
|
- secid->secmark = 0;
|
|
|
|
+ secid->common = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int security_inode_copy_up(struct dentry *src, struct cred **new)
|
|
|
|
@@ -1047,7 +1047,7 @@ static inline int security_task_getsid(struct task_struct *p)
|
|
|
|
static inline void security_task_getsecid(struct task_struct *p,
|
|
|
|
struct secids *secid)
|
|
|
|
{
|
|
|
|
- secid->secmark = 0;
|
|
|
|
+ secid->common = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int security_task_setnice(struct task_struct *p, int nice)
|
|
|
|
@@ -1122,7 +1122,7 @@ static inline int security_ipc_permission(struct kern_ipc_perm *ipcp,
|
|
|
|
static inline void security_ipc_getsecid(struct kern_ipc_perm *ipcp,
|
|
|
|
struct secids *secid)
|
|
|
|
{
|
|
|
|
- secid->secmark = 0;
|
|
|
|
+ secid->common = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int security_msg_msg_alloc(struct msg_msg *msg)
|
|
|
|
--
|
2019-04-08 18:08:36 +08:00
|
|
|
https://clearlinux.org
|
2018-11-06 04:14:04 +08:00
|
|
|
|