aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smackfs.c
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2010-12-02 09:43:39 -0500
committerCasey Schaufler <casey@schaufler-ca.com>2010-12-02 09:43:39 -0500
commit676dac4b1bee0469d6932f698aeb77e8489f5861 (patch)
tree196b4cb35cf8dfdff0698dc4368cfd00acc7391a /security/smack/smackfs.c
parent93ae86e759299718c611bc543b9b1633bf32905a (diff)
This patch adds a new security attribute to Smack called
SMACK64EXEC. It defines label that is used while task is running. Exception: in smack_task_wait() child task is checked for write access to parent task using label inherited from the task that forked it. Fixed issues from previous submit: - SMACK64EXEC was not read when SMACK64 was not set. - inode security blob was not updated after setting SMACK64EXEC - inode security blob was not updated when removing SMACK64EXEC
Diffstat (limited to 'security/smack/smackfs.c')
-rw-r--r--security/smack/smackfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index dc1fd6239f24..01a0be93d8d0 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -121,7 +121,7 @@ static void smk_netlabel_audit_set(struct netlbl_audit *nap)
121{ 121{
122 nap->loginuid = audit_get_loginuid(current); 122 nap->loginuid = audit_get_loginuid(current);
123 nap->sessionid = audit_get_sessionid(current); 123 nap->sessionid = audit_get_sessionid(current);
124 nap->secid = smack_to_secid(current_security()); 124 nap->secid = smack_to_secid(smk_of_current());
125} 125}
126 126
127/* 127/*
@@ -1160,7 +1160,7 @@ static ssize_t smk_write_onlycap(struct file *file, const char __user *buf,
1160 size_t count, loff_t *ppos) 1160 size_t count, loff_t *ppos)
1161{ 1161{
1162 char in[SMK_LABELLEN]; 1162 char in[SMK_LABELLEN];
1163 char *sp = current->cred->security; 1163 char *sp = smk_of_task(current->cred->security);
1164 1164
1165 if (!capable(CAP_MAC_ADMIN)) 1165 if (!capable(CAP_MAC_ADMIN))
1166 return -EPERM; 1166 return -EPERM;