Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp841454rwo; Wed, 2 Aug 2023 05:12:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlGd1WKWW0Bju5zO5EJngRvM/VXBc6dGAUSwKfPuW818DtLq/wIzPZKOmsewGfh5MKTIy+vs X-Received: by 2002:a9d:7ace:0:b0:6b6:9f34:e9a8 with SMTP id m14-20020a9d7ace000000b006b69f34e9a8mr15627009otn.11.1690978338626; Wed, 02 Aug 2023 05:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690978338; cv=none; d=google.com; s=arc-20160816; b=A7oiEembHUptFhx7LlIHKQtl4bsz8YVGaXRPRckBCf/UYeruCjhmljEixjIqTkgOz7 FAS2PHw2EteEw+3gN1tGECgpS0ZBegum+HRXGHQtTifEVP23Vz8WI2FAFv29HZ0xjcdg JHAjRRNMRrg7Ka+7mGMsbaJeL83oozjcAivMTZ20akYfx2iEpRCM3qrvHYLWTz5A3i8e sZYhWYHeTYKqeATFmG0MwrTeVtbsLNaqUviR1LqJNOw28+LkoSYzvvqBBUvk4tvArBjb mThKVBkvpTqsptPORjRiqm4Mi3Hp4DTbb0TQ5Atv3BVVkhIbZOCjDXyd9XK8MOf0tzR6 x6fQ== 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:reply-to:to:from:dkim-signature; bh=FTrd3R6y0OS+7hOkRwIFaBAZfVuWSkM4kVldAAQzw+Y=; fh=aQPIx/vTkHfX3hx56OQPPJtWhOSklM8rd4anPyOx5P8=; b=OO8Z/62F77C4kan2bssj69XZVrJakeS0AaQWmcIX6V9yn7JR4IceQkeVuWrXo2P0A8 YdvAFRJZr/fgyc4m9TaPhzwNvSlMz2qQm60Z4RqxYXSyix4H9JxbAr7M++zUIav6VdHD MPIKLdIPqImIAQtIsTQ7DJNy8IDPAv2dd0FGUF/qrhZoYgukaR+tkPQWciiXgE+DYbxs tmXKOc9i2GnGa++mrKP3mvJi0c8OCrlf4SHgQvGi/OWGbDpNKwtJviAVNyjlzJLyc3IF KWSwGdRUd2SJ+3UzurLIwgE9DyKTLOD7dSEcRv67/3sHeDqEZKNZXkKACKSdAm9mKNW6 yVcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=TGqT7vlT; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r192-20020a632bc9000000b0055b43079640si6717083pgr.707.2023.08.02.05.12.13; Wed, 02 Aug 2023 05:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of selinux-refpolicy-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=@coker.com.au header.s=2008 header.b=TGqT7vlT; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234005AbjHBLme (ORCPT + 21 others); Wed, 2 Aug 2023 07:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231800AbjHBLmd (ORCPT ); Wed, 2 Aug 2023 07:42:33 -0400 X-Greylist: delayed 389 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 02 Aug 2023 04:42:31 PDT Received: from smtp.sws.net.au (smtp.sws.net.au [IPv6:2a01:4f8:200:641c::dada:cafe]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81977C0 for ; Wed, 2 Aug 2023 04:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1690976160; bh=FTrd3R6y0OS+7hOkRwIFaBAZfVuWSkM4kVldAAQzw+Y=; l=2205; h=From:To:Reply-To:Subject:Date:From; b=TGqT7vlTFAmYD65PXNBsGUSMKk4/gHna2C7Bpt1pO3W9Z4F8Or8EGOeXYUCRv5pEg +7S0+TMCe6Ar3b64EUiSsONpitJ8O/sOlXeIaGviXFzxVRaEWeSx+6UXBqYv0Sr5S2 Uo/WZINnAPNq+i/S+K57CJ5gLEid0qbvp9tSSiAE= Received: from xev.coker.com.au (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id EDE5F183F6 for ; Wed, 2 Aug 2023 21:35:59 +1000 (AEST) Received: by xev.coker.com.au (Postfix, from userid 1001) id EDFE71E976AF; Wed, 2 Aug 2023 21:35:54 +1000 (AEST) From: Russell Coker To: selinux-refpolicy@vger.kernel.org Reply-To: russell@coker.com.au Subject: syntax errors from sepolgen-ifgen Date: Wed, 02 Aug 2023 21:35:54 +1000 Message-ID: <2331533.72vocr9iq0@xev> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: selinux-refpolicy@vger.kernel.org /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2064 true [type=TRUE] /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2075 ' [type=SQUOTE] /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2079 ' [type=SQUOTE] /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2090 ' [type=SQUOTE] /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2094 ' [type=SQUOTE] /usr/share/selinux/devel/include/kernel/kernel.if: Syntax error on line 1737 - [type=MINUS] /usr/share/selinux/devel/include/kernel/kernel.if: Syntax error on line 1755 - [type=MINUS] I see the above errors when I run sepolgen-ifgen. interface(`init_startstop_service',` ifelse(`init_systemd',`true',` # This ifelse condition is temporary, until # all callers are updated to provide unit files. ifelse(`$5',`',`',` gen_require(` class service { start status stop }; ') allow $1 $5:service { start status stop }; ') ',`distro_gentoo',`true',` # for OpenRC seutil_labeled_init_script_run_runinit($1, $2, $4) ',`direct_sysadm_daemon',`true',` gen_require(` role system_r; ') The first 3 are from the above, the init_systemd, distro_gentoo, and direct_sysadm_daemon macros. https://www.gnu.org/software/m4/manual/html_node/Ifelse.html According to the above web page we shouldn't have quotes around those macros to allow expansion. But removing them gives the following errors: /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2064 init_systemd [type=IDENTIFIER] /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2075 ' [type=SQUOTE] /usr/share/selinux/devel/include/system/init.if: Syntax error on line 2079 ' [type=SQUOTE] The errors about type=MINUS are from the the -proc_type in the following: interface(`kernel_write_non_proc_init_mountpoint_files',` gen_require(` attribute proc_type; ') init_write_mountpoint_files($1, -proc_type) ') Any suggestions on how to address this? My m4 skills aren't up to this task. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/