Message ID | 20190419004617.64627-38-casey@schaufler-ca.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <selinux-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 53AB21515 for <patchwork-selinux@patchwork.kernel.org>; Fri, 19 Apr 2019 00:47:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4079128B8F for <patchwork-selinux@patchwork.kernel.org>; Fri, 19 Apr 2019 00:47:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34F9928B9C; Fri, 19 Apr 2019 00:47:51 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 D661228B8F for <patchwork-selinux@patchwork.kernel.org>; Fri, 19 Apr 2019 00:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbfDSAru (ORCPT <rfc822;patchwork-selinux@patchwork.kernel.org>); Thu, 18 Apr 2019 20:47:50 -0400 Received: from sonic310-23.consmr.mail.bf2.yahoo.com ([74.6.135.197]:38320 "EHLO sonic310-23.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbfDSAru (ORCPT <rfc822;selinux@vger.kernel.org>); Thu, 18 Apr 2019 20:47:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1555634869; b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YND607VnoYc9SW1cqWuCZk5FJ nA_Q_7DjVdaFbjtfdaZK6i8PTTZns.bo4WZHLzZHscxK1FmqNbfQLHBeSb90gqhikPq4QnAZkRS9 .Q.nnheZHD9iiiUNZVDoxT1eqngZ0GPuzv4e0qZumcVB8NWH5lbFVi.Ufb9qF_lqNpWw2Pl4aarM 4DukNWG9RzYLquOgU0CqKoOhvWRom1mt2kZNfTmdD_IAh_vUPHHIRhDKEyhca0gKFYU0YJqR7Xub rIQL6OYCHNJSQ.8Aj5M6Z.X.uxq4K6pPUqAcz4Si9TlMbExSb5wjvpJmVes636tnGAArxKaCYwyE Rbpe9p4dQrJk7SMSYMWvQTtZcuD8tE1fZmogogaxlyjbO.NxFHVrN3IJ7NM289DQL19E_GPzRaU0 zGeXJU2jTGFHNiWiZ4hrtvVA6khdbQz11uRfYE3VYvdva5R99qFBFTRcifU9bZK6z17ghkrFlNhv KdMSw5m9ZYnEAk_55CwdNrMuSPROcDSQCNsGm6S57gIEj6Naq_St6Pahg2jZgCdMy53GCLzkftVv cqW3Gtvx5_opS Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Fri, 19 Apr 2019 00:47:49 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO localhost.localdomain) ([67.169.65.224]) by smtp422.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID be9fa3e2c75d2b77c1de47e4a712b0c9; Fri, 19 Apr 2019 00:47:46 +0000 (UTC) From: Casey Schaufler <casey@schaufler-ca.com> To: casey.schaufler@intel.com, jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Cc: casey@schaufler-ca.com Subject: [PATCH 37/90] LSM: Create a data structure for a security context Date: Thu, 18 Apr 2019 17:45:24 -0700 Message-Id: <20190419004617.64627-38-casey@schaufler-ca.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190419004617.64627-1-casey@schaufler-ca.com> References: <20190419004617.64627-1-casey@schaufler-ca.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: <selinux.vger.kernel.org> X-Mailing-List: selinux@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
LSM: Module stacking for all
|
expand
|
diff --git a/include/linux/security.h b/include/linux/security.h index dde36e850cf0..e12b169deed6 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) return true; } +/* 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(+)