summaryrefslogtreecommitdiff
path: root/security/security.c
diff options
context:
space:
mode:
authorDavid Quigley <dpquigl@davequigley.com>2013-05-22 12:50:35 -0400
committerYin Kangkai <kangkai.yin@intel.com>2014-01-04 00:03:20 +0800
commit262ba58841464ba8b330014ebb7e212aafeb607b (patch)
tree1d392e12c76cf1ab03364754dac434012d19d3ed /security/security.c
parent9ca0f82814584ab0f5beb2153fd241ce677dc07d (diff)
downloadkernel-clovertrail-262ba58841464ba8b330014ebb7e212aafeb607b.tar.gz
kernel-clovertrail-262ba58841464ba8b330014ebb7e212aafeb607b.tar.bz2
kernel-clovertrail-262ba58841464ba8b330014ebb7e212aafeb607b.zip
Security: Add Hook to test if the particular xattr is part of a MAC model.
The interface to request security labels from user space is the xattr interface. When requesting the security label from an NFS server it is important to make sure the requested xattr actually is a MAC label. This allows us to make sure that we get the desired semantics from the attribute instead of something else such as capabilities or a time based LSM. Change-Id: I283f116953f958877826ba772661b5755986ac99 Acked-by: Eric Paris <eparis@redhat.com> Acked-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Matthew N. Dodd <Matthew.Dodd@sparta.com> Signed-off-by: Miguel Rodel Felipe <Rodel_FM@dsi.a-star.edu.sg> Signed-off-by: Phua Eu Gene <PHUA_Eu_Gene@dsi.a-star.edu.sg> Signed-off-by: Khin Mi Mi Aung <Mi_Mi_AUNG@dsi.a-star.edu.sg> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com> (cherry picked from commit 9cf5cc4f969032b8f571025845a59fce3ba2a17c) Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c
index d91c66d3956..9a3eef104cc 100644
--- a/security/security.c
+++ b/security/security.c
@@ -972,6 +972,12 @@ int security_netlink_send(struct sock *sk, struct sk_buff *skb)
return security_ops->netlink_send(sk, skb);
}
+int security_ismaclabel(const char *name)
+{
+ return security_ops->ismaclabel(name);
+}
+EXPORT_SYMBOL(security_ismaclabel);
+
int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen)
{
return security_ops->secid_to_secctx(secid, secdata, seclen);