From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1605812-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C3545158041 for <garchives@archives.gentoo.org>; Fri, 1 Mar 2024 19:56:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BEF37E2A01; Fri, 1 Mar 2024 19:56:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A21E1E2A01 for <gentoo-commits@lists.gentoo.org>; Fri, 1 Mar 2024 19:56:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 90F5934310D for <gentoo-commits@lists.gentoo.org>; Fri, 1 Mar 2024 19:56:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 048A614EA for <gentoo-commits@lists.gentoo.org>; Fri, 1 Mar 2024 19:56:10 +0000 (UTC) From: "Kenton Groombridge" <concord@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kenton Groombridge" <concord@gentoo.org> Message-ID: <1709312735.35167ff4b12c7285fcfed384d4a3bac2ca6eed85.concord@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/support/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/support/loadable_module.spt X-VCS-Directories: policy/support/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 35167ff4b12c7285fcfed384d4a3bac2ca6eed85 X-VCS-Branch: master Date: Fri, 1 Mar 2024 19:56:10 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 73de8ed5-c22b-4119-b056-c2892be405be X-Archives-Hash: bc5419ea31436b51b711c0f5873ad1e3 commit: 35167ff4b12c7285fcfed384d4a3bac2ca6eed85 Author: Christian Göttsche <cgzones <AT> googlemail <DOT> com> AuthorDate: Thu Feb 22 16:27:36 2024 +0000 Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org> CommitDate: Fri Mar 1 17:05:35 2024 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=35167ff4 Support multi-line interface calls Support splitting the call of an interface over multiple lines, e.g. for interfaces with a long list as argument: term_control_unallocated_ttys(udev_t, { ioctl_kdgkbtype ioctl_kdgetmode ioctl_pio_unimap ioctl_pio_unimapclr ioctl_kdfontop ioctl_tcgets }) Signed-off-by: Christian Göttsche <cgzones <AT> googlemail.com> Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org> policy/support/loadable_module.spt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/policy/support/loadable_module.spt b/policy/support/loadable_module.spt index 1f6163054..93e793961 100644 --- a/policy/support/loadable_module.spt +++ b/policy/support/loadable_module.spt @@ -53,6 +53,11 @@ define(`policy_m4_comment',` ##### $2 depth: $1 ')dnl +define(NL,` +')dnl + +define(`chomp', `translit(`$1',NL,` ')')dnl + ############################## # # In the future interfaces should be in loadable modules @@ -63,10 +68,10 @@ define(`template',` dnl ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__file__:__line__)') dnl `define(`$1',` dnl pushdef(`policy_call_depth',incr(policy_call_depth)) dnl - policy_m4_comment(policy_call_depth,begin `$1'(dollarsstar)) dnl + policy_m4_comment(policy_call_depth,begin `$1'(chomp(dollarsstar))) dnl $2 dnl popdef(`policy_call_depth') dnl - policy_m4_comment(policy_call_depth,end `$1'(dollarsstar)) dnl + policy_m4_comment(policy_call_depth,end `$1'(chomp(dollarsstar))) dnl '') ') @@ -80,10 +85,10 @@ define(`interface',` dnl ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__file__:__line__)') dnl `define(`$1',` dnl pushdef(`policy_call_depth',incr(policy_call_depth)) dnl - policy_m4_comment(policy_call_depth,begin `$1'(dollarsstar)) dnl + policy_m4_comment(policy_call_depth,begin `$1'(chomp(dollarsstar))) dnl $2 dnl popdef(`policy_call_depth') dnl - policy_m4_comment(policy_call_depth,end `$1'(dollarsstar)) dnl + policy_m4_comment(policy_call_depth,end `$1'(chomp(dollarsstar))) dnl '') ')