Message ID | 20190228221933.2551-26-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 19E4F1A2B for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 063602A62A for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E90A02F431; 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=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 773E52F323 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 S1729783AbfB1WUN (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Thu, 28 Feb 2019 17:20:13 -0500 Received: from sonic309-27.consmr.mail.gq1.yahoo.com ([98.137.65.153]:34617 "EHLO sonic309-27.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729581AbfB1WUB (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Thu, 28 Feb 2019 17:20:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1551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ar1yuW.8gq3Ds6XclG6YMDJHjstMGv4uXk278Sn24d_v_8jHVM5wi HI9wwrxJtaGKZT9x.FmKm611q6BA_jqzcx2r4wnMogOd53Nwl_3Grsd4tXauEHX9ERTY3QyFdXiX 185Jc1TL999EpyggLcuMgiMdjceWKfMYu625grZjpDSc9eVGE6vTnMrLuvp7hOY4qCCuCbEkM4qs _6mxCk_aRNXAhxIUG5XBF4hMVa2Mg.9qAG4B79bb0ICfEM8AEcVLEme3l3XgaTVGUCzUvL42CwcY .qT2t0ilVnNwhV3b4Cw7EexjA62kfwsnAoQVnh6Ur1NZ_YqDkLXvYOmc4ph.TrO8sM1SkkxVMSoK bXychDixdLj7k89CDehC2zaAGNCjmxPO7tYl0mGfR5JDzCSdRx1lwhUcTZPzRw98lWicvD7sfb3z 7cyp0QQJZTlt0PsCa1i.I0EXwK1pBg2sEZoFSZqWeEi4IdYpSsFydeKqfvTo5KneuSR4W1oPHb5a fKxpzT84iUtc64lZvEh7HidyrpS.mAPuTJxqSC6lIyyCA2Rs- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Thu, 28 Feb 2019 22:20:00 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO localhost.localdomain) ([67.169.65.224]) by smtp406.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5c7d685bea94a92cc9d12c4cc22f1f0e; Thu, 28 Feb 2019 22:19:58 +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 25/97] LSM: FIXUP - security_secid_to_secctx Date: Thu, 28 Feb 2019 14:18:21 -0800 Message-Id: <20190228221933.2551-26-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/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c index 4676f5bb16ae..0266879efef1 100644 --- a/net/netlabel/netlabel_user.c +++ b/net/netlabel/netlabel_user.c @@ -100,6 +100,7 @@ struct audit_buffer *netlbl_audit_start_common(int type, struct audit_buffer *audit_buf; char *secctx; u32 secctx_len; + struct lsm_export le; if (audit_enabled == AUDIT_OFF) return NULL; @@ -112,8 +113,10 @@ struct audit_buffer *netlbl_audit_start_common(int type, from_kuid(&init_user_ns, audit_info->loginuid), audit_info->sessionid); + if (audit_info->secid != 0) + lsm_export_to_all(&le, audit_info->secid); if (audit_info->secid != 0 && - security_secid_to_secctx(audit_info->secid, + security_secid_to_secctx(&le, &secctx, &secctx_len) == 0) { audit_log_format(audit_buf, " subj=%s", secctx);
Fix in netlabel for security_secid_to_secctx Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> --- net/netlabel/netlabel_user.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)