aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smack.h
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2013-05-22 21:42:56 -0400
committerCasey Schaufler <casey@schaufler-ca.com>2013-05-28 13:08:26 -0400
commitc673944347edfd4362b10eea11ac384a582b1cf5 (patch)
treeb1495c8af7910a697e4b6c6e13790911f02b8291 /security/smack/smack.h
parent4726e8fa1dcad533362475ebf91f70d5b6b6292f (diff)
Smack: Local IPv6 port based controls
Smack does not provide access controls on IPv6 communications. This patch introduces a mechanism for maintaining Smack lables for local IPv6 communications. It is based on labeling local ports. The behavior should be compatible with any future "real" IPv6 support as it provides no interfaces for users to manipulate the labeling. Remote IPv6 connections use the ambient label the same way that unlabeled IPv4 packets are treated. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r--security/smack/smack.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h
index 8ad30955e15d..bb28e099abfe 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -94,6 +94,17 @@ struct smk_netlbladdr {
94}; 94};
95 95
96/* 96/*
97 * An entry in the table identifying ports.
98 */
99struct smk_port_label {
100 struct list_head list;
101 struct sock *smk_sock; /* socket initialized on */
102 unsigned short smk_port; /* the port number */
103 char *smk_in; /* incoming label */
104 char *smk_out; /* outgoing label */
105};
106
107/*
97 * This is the repository for labels seen so that it is 108 * This is the repository for labels seen so that it is
98 * not necessary to keep allocating tiny chuncks of memory 109 * not necessary to keep allocating tiny chuncks of memory
99 * and so that they can be shared. 110 * and so that they can be shared.