Message ID | 20190228221933.2551-44-casey@schaufler-ca.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-security-module-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C17DA4B76 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B80962F4E9 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5FF22F500; Thu, 28 Feb 2019 22:20:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557A32F8BD for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730004AbfB1WUO (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Thu, 28 Feb 2019 17:20:14 -0500 Received: from sonic309-27.consmr.mail.gq1.yahoo.com ([98.137.65.153]:43881 "EHLO sonic309-27.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730060AbfB1WUL (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Thu, 28 Feb 2019 17:20:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048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GJag5iwOziTT8JitlBCIheZlUwsUV1sRGC9b_mO1M wRMIAQVrQup_SwEz8GFEZdAxltwXhxKZhMm.yvIoMLV1LA6iYz3SlcugErTTuOSbixrsEgdd.dBG FvmfTwr_lIui6aIW8N_3810L3ImfVfFOSHg1DBkK9H47ti2fIufabPYj1Pg5JYu9Vr4iJIdAQt59 tNybYwJWjDtjjDcjWSPeU4WBhsuosk0OAb6rTySFN6O_zhCJkHRKR8jaYmJIdAIJ9pXCgH7SYH_r HlzgKKVwbg9h9Eo8rx8EcOM4o1PO4sTUSIbMfuOvk8jq42eu4xuYORkREaqWaqSD72ISoe0EdkQo LenKPYQ47iS4GrUeo5HnwDp5a3QbyKNTjQrfilBxIv3GCJm3B1vZuhh5H_3blCBKYrQn7uP0gUp4 RvrW8MxZXUhlvumYr4xhUj_BPnmGZbiR9ni4qhaXdJ3XrF_kpIkPu2DDoWsmwUNrJiY1RLPJje1R pPUwFyDk_0q08BNifBa6Qo0QErx8cGjQr6CxKz8BOy8XS6Scv Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Thu, 28 Feb 2019 22:20:10 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO localhost.localdomain) ([67.169.65.224]) by smtp430.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e588ca5e0935b1286f019b02cb065c6f; Thu, 28 Feb 2019 22:20:10 +0000 (UTC) From: Casey Schaufler <casey@schaufler-ca.com> To: jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Cc: keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com Subject: [PATCH 43/97] LSM: Create a data structure for a security context Date: Thu, 28 Feb 2019 14:18:39 -0800 Message-Id: <20190228221933.2551-44-casey@schaufler-ca.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190228221933.2551-1-casey@schaufler-ca.com> References: <20190228221933.2551-1-casey@schaufler-ca.com> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: <linux-security-module.vger.kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
LSM: Complete module stacking
|
expand
|
diff --git a/include/linux/security.h b/include/linux/security.h index b8c67da7409e..b60152334d9f 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -116,6 +116,17 @@ static inline bool lsm_export_equal(struct lsm_export *l, struct lsm_export *m) extern struct lsm_export *lsm_export_skb(struct sk_buff *skb); +/* Text representation of LSM specific security information - a "context" */ +struct lsm_context { + char *context; + u32 len; +}; + +static inline void lsm_context_init(struct lsm_context *cp) +{ + memset(cp, 0, sizeof(*cp)); +} + /* These functions are in security/commoncap.c */ extern int cap_capable(const struct cred *cred, struct user_namespace *ns, int cap, unsigned int opts);
A "security context" is the text representation of the information used by LSMs. This provides a structure so that the use can be made consistant. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> --- include/linux/security.h | 11 +++++++++++ 1 file changed, 11 insertions(+)