From patchwork Thu May 11 12:32:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_G=C3=B6ttsche?= X-Patchwork-Id: 92546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp4335285vqo; Thu, 11 May 2023 05:36:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7OQad5X+RkZl9DqfwjbaGpUUc8Jl4eDu5pi9GILw6d50c+1tIQaiHYLD/jf3fRl+Sz7GbO X-Received: by 2002:a17:90b:1d87:b0:24e:3206:7ca9 with SMTP id pf7-20020a17090b1d8700b0024e32067ca9mr21059995pjb.46.1683808603916; Thu, 11 May 2023 05:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683808603; cv=none; d=google.com; s=arc-20160816; b=DGebBf5tG6lLitcMz7uPgxYLOrhS/ptGZGXBsleU402dk3iYBIPTirw8pjYwG+J7uu whhUdDOUZj4CtFdZRI2Q0bu+r960c/bjUMOp0+ahqmrqmbOFar7/FNncvxyuKHJ7CtPL B/OPBLJjs1l4LS2LbQhCOLxNpIwd713FtWNIiaC54ztwSyHTZvLC5E/VSzdlWWHKjwpb p5dlNuHV9Q7wFpMs35xb2MUFXuwdBTlTXuOpOfncDXIQ6SsuIo7ib9fOAmv3JNlcmjvF yvqaOlaFPEWOZC91OjMUT0eMC8yyyeVOEqPDcPhMTtKhAAJBiTE4K197R1BQomFs8YHO CQEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UgBzRU2uzV6XtIpRwtsK9Z2OAn4rY86ByIz0hF5YH7o=; b=kk/PmK9tXMvhJ4L3Sb3i4UaeuwxptBAQf4N2I+X1hle8Rwsmc3geBojKURFPLBnI1G uPZZ7zEaANkTAxooG6tbt2aSm3BG0Bv6rXFR6Qi+cAXeH8M+JBAJF4Pew1Sz+hhW/i1H uuCLdQhyoyWv8EeiO0Q06rUe4cbbYwaO+gBOZ1Tbj4b7POnSSMAkNLVZnqaHGjw9g5fH IxdHa1lRckh7phxKwI/nczNE5uHE3sfNqYsDP8qUwJkWvMh+vXlOz2Cz/Suta6+f2Gpb cVDMdPMxak3Yd2Fv5jj5D/TUBAwIy9kGiYkD6DgjDqWlu0s53XgEp+8pf+bOv83t9cyO 1xtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20221208 header.b=fKCyLvQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a17090aa58c00b002373125c085si31766595pjq.141.2023.05.11.05.36.30; Thu, 11 May 2023 05:36:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20221208 header.b=fKCyLvQp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237992AbjEKMc4 (ORCPT + 99 others); Thu, 11 May 2023 08:32:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238002AbjEKMcx (ORCPT ); Thu, 11 May 2023 08:32:53 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8358749CC; Thu, 11 May 2023 05:32:43 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-965ac4dd11bso1696294066b.2; Thu, 11 May 2023 05:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1683808362; x=1686400362; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UgBzRU2uzV6XtIpRwtsK9Z2OAn4rY86ByIz0hF5YH7o=; b=fKCyLvQpJWN+ijF8GWDrLH9ehTGQE0KsXkAjZxM35ki3X3vx59D0pIqoph9fKAHmNn l0ME89DxdGx2vpOhdNI1Azj8YNlRJBQerZkMcC0YUi2hcDJ8Wq1GX3tPoOU2F504Ednw /IdLt0jb1+O+tgKST3w+4mIKcPZBExmI17Tnm49TDZNwLamqbAIYnxYD8eZAV3fHJU6D JVEdXCcNpXSagdQ0YwoCQ7mbtENDsAwk6uYAcbqdkHL7yhrRoNcF2FP6DqWTXc8PkWS1 5xlDkLHR/bDifLxBpyO2tP+7ZhLkG37NJBbDy2oQIQj5sNffA8BgKQ8Pf60DhcrqBqpg Ktbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683808362; x=1686400362; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UgBzRU2uzV6XtIpRwtsK9Z2OAn4rY86ByIz0hF5YH7o=; b=VqIxBRLGLNENMb5s7RJZrHJhX5J0RezW5qhtcpKavP/v5h17lY87KDOjYU6KIT2eyz TBiaf4ML9eh/KQl8cKnKuqPFYwsxKqGPOqyqxBJYbEP2SUjevjaBiV6HX+V/qpLIWD8q 2snG5AUnrE74xmJ48XJCd882B8pZrN7HtxfuhBebrVBVFjknIryS1nsW033HDUQoMxLe Qwydp6S91GR3fxQE1/H+ylqTtJE4EFEfROi5JtqWGdjRH1ND0byOR3IgG09Fy2MFp3SA c5SvrBBPsyPJbK/jSmgdsW83d1UefNgZUUB71oGTxy9BQ94WOXnur3jyXn1+Y1QQ2LCY pyng== X-Gm-Message-State: AC+VfDwPmnPY28B192v/kBrKnZN0Ssaww5LM94rXgvE0ty92i7MWA2TM am4cKfn83VHEGthOFaW9OSn4AoLszpI= X-Received: by 2002:a17:907:6e0a:b0:967:e015:f542 with SMTP id sd10-20020a1709076e0a00b00967e015f542mr12764969ejc.44.1683808361963; Thu, 11 May 2023 05:32:41 -0700 (PDT) Received: from debianHome.localdomain (dynamic-077-008-180-228.77.8.pool.telefonica.de. [77.8.180.228]) by smtp.gmail.com with ESMTPSA id s24-20020aa7d798000000b0050bc37ff74asm2950213edq.44.2023.05.11.05.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 05:32:41 -0700 (PDT) From: =?utf-8?q?Christian_G=C3=B6ttsche?= To: selinux@vger.kernel.org Cc: Paul Moore , Stephen Smalley , Eric Paris , linux-kernel@vger.kernel.org Subject: [PATCH] selinux: make header files self-including Date: Thu, 11 May 2023 14:32:35 +0200 Message-Id: <20230511123236.723025-1-cgzones@googlemail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765601290500891728?= X-GMAIL-MSGID: =?utf-8?q?1765601290500891728?= Include all necessary headers in header files to enable third party applications, like LSP servers, to resolve all used symbols. ibpkey.h: include "../flask.h" for SECINITSID_UNLABELED initial_sid_to_string.h: include for NULL Signed-off-by: Christian Göttsche --- security/selinux/include/ibpkey.h | 1 + security/selinux/include/initial_sid_to_string.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/security/selinux/include/ibpkey.h b/security/selinux/include/ibpkey.h index c992f83b0aae..f8a791b07092 100644 --- a/security/selinux/include/ibpkey.h +++ b/security/selinux/include/ibpkey.h @@ -15,6 +15,7 @@ #define _SELINUX_IB_PKEY_H #include +#include "../flask.h" #ifdef CONFIG_SECURITY_INFINIBAND void sel_ib_pkey_flush(void); diff --git a/security/selinux/include/initial_sid_to_string.h b/security/selinux/include/initial_sid_to_string.h index 60820517aa43..ecc6e74fa09b 100644 --- a/security/selinux/include/initial_sid_to_string.h +++ b/security/selinux/include/initial_sid_to_string.h @@ -1,4 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ + +#include + static const char *const initial_sid_to_string[] = { NULL, "kernel",