From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C6FCC04E69 for ; Wed, 2 Aug 2023 11:42:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234005AbjHBLme (ORCPT ); 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" 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/