aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smack_access.c
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2016-11-14 12:38:15 -0500
committerCasey Schaufler <casey@schaufler-ca.com>2016-11-15 12:34:39 -0500
commit152f91d4d11a30106b9cc0b27b47e0e80b633ee8 (patch)
tree33fdd28f8075586b8c11ea4175400b51cd8eb38c /security/smack/smack_access.c
parent8c15d66e429afd099b66f05393527c23f85ca41c (diff)
Smack: Remove unnecessary smack_known_invalid
The invalid Smack label ("") and the Huh ("?") Smack label serve the same purpose and having both is unnecessary. While pulling out the invalid label it became clear that the use of smack_from_secid() was inconsistent, so that is repaired. The setting of inode labels to the invalid label could never happen in a functional system, has never been observed in the wild and is not what you'd really want for a failure behavior in any case. That is removed. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smack_access.c')
-rw-r--r--security/smack/smack_access.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
index 23e5808a0970..356e3764cad9 100644
--- a/security/smack/smack_access.c
+++ b/security/smack/smack_access.c
@@ -36,11 +36,6 @@ struct smack_known smack_known_floor = {
36 .smk_secid = 5, 36 .smk_secid = 5,
37}; 37};
38 38
39struct smack_known smack_known_invalid = {
40 .smk_known = "",
41 .smk_secid = 6,
42};
43
44struct smack_known smack_known_web = { 39struct smack_known smack_known_web = {
45 .smk_known = "@", 40 .smk_known = "@",
46 .smk_secid = 7, 41 .smk_secid = 7,
@@ -615,7 +610,7 @@ struct smack_known *smack_from_secid(const u32 secid)
615 * of a secid that is not on the list. 610 * of a secid that is not on the list.
616 */ 611 */
617 rcu_read_unlock(); 612 rcu_read_unlock();
618 return &smack_known_invalid; 613 return &smack_known_huh;
619} 614}
620 615
621/* 616/*