[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1303907657-18366-5-git-send-email-roberto.sassu@polito.it>
Date: Wed, 27 Apr 2011 14:34:12 +0200
From: Roberto Sassu <roberto.sassu@...ito.it>
To: linux-security-module@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
dhowells@...hat.com, jmorris@...ei.org, zohar@...ux.vnet.ibm.com,
safford@...son.ibm.com, tyhicks@...ux.vnet.ibm.com,
kirkland@...onical.com, ecryptfs-devel@...ts.launchpad.net,
casey@...aufler-ca.com, eparis@...hat.com, sds@...ho.nsa.gov,
selinux@...ho.nsa.gov, viro@...iv.linux.org.uk,
Roberto Sassu <roberto.sassu@...ito.it>
Subject: [RFC][PATCH 4/7] smack: fix label check in smack_kernel_act_as()
The function smack_kernel_act_as() must return -EINVAL if the label
returned by smack_from_secid() is equal to 'smack_known_invalid.smk_known',
which means that no entries in the 'smack_known_list' list matching the
security identifier given are found.
Signed-off-by: Roberto Sassu <roberto.sassu@...ito.it>
---
security/smack/smack_lsm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index e3c9e54..0e7ed31 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -1415,7 +1415,7 @@ static int smack_kernel_act_as(struct cred *new, u32 secid)
struct task_smack *new_tsp = new->security;
char *smack = smack_from_secid(secid);
- if (smack == NULL)
+ if (smack == smack_known_invalid.smk_known)
return -EINVAL;
new_tsp->smk_task = smack;
--
1.7.4.4
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (2061 bytes)
Powered by blists - more mailing lists