Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5021694ybl; Mon, 26 Aug 2019 21:05:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEm8N+dCq1iPXOZ0+9oLja6U7TkXKQaB5RDvH8vs6NEF89ftBZW5YePfVpIKuPhkNQ+l2j X-Received: by 2002:a63:ed55:: with SMTP id m21mr19486366pgk.343.1566878731653; Mon, 26 Aug 2019 21:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566878731; cv=none; d=google.com; s=arc-20160816; b=tpsKQKHxcA4kal5yx0u8xWt+52S6MgXSjNatZzeHChE1KrUeRSSuoLKW6BPhOTaO7b Ms6NiUe8JpJ2ggAgPg5jILdxQnJu2ZI9Qq4p/w6UUfa4xxoccfuNlOcGWI4vBWtwI6vq unu6UXjiGt0SAC3YSFBv5o1Q7fVlP8DsiK/sXrDAyqqY24SSRLT6mX9jMI+dBm68xSLn e0Te5MgTAseke32jzGMCplmeA/6YUnIGABAm648cJWy/6zmuVddmtN3IuYgTswZphrez KcNtCZEiNT5VBAPMuIiD7GYSvZqGx5S00w/omlthVZR9YViYbRIj7Fff28NFEvr4IoKv Wy1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=kRaL0/ZsaDxs5/SJnyIf4vJPAhNPafKkWQiQJWA9Ii4=; b=HgkQYzkRMBYjGe4PnF9MUSRsFWxODZXR1l4k7VIN1rpfgAfESZleFV3m1CsiApF0w4 jT9+KOcMdgp6XDnTjtEtlrkkg/tjWampOMxZ8eXCd3KgtRdqkT3ukhMkIsj3L4jlu+v8 p9Zs++6d+Gm/GRIejfUkVI7Fl9v6PKesMB8WZLu7XrjX2AE7gxLAkfkMaXfgR6GU+Vo4 IuCBQjljUDLfRgKv3dRgRpjv3nWnyZv6hwdh6KwfZT0hUEix39ZfEg+F4c+1c8oTPHqD Qf2HdDhRcmMgsr3UCMiR0WPqeJxwQlFL1KPwXobJg1HWEnHga1merwG9u++1VbEofll/ R8fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=SqXMDtQL; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si10796583pgl.448.2019.08.26.21.05.27; Mon, 26 Aug 2019 21:05:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=SqXMDtQL; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726255AbfH0EFI (ORCPT + 11 others); Tue, 27 Aug 2019 00:05:08 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:43552 "EHLO mail-qk1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726152AbfH0EFI (ORCPT ); Tue, 27 Aug 2019 00:05:08 -0400 Received: by mail-qk1-f182.google.com with SMTP id m2so15923631qkd.10 for ; Mon, 26 Aug 2019 21:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=kRaL0/ZsaDxs5/SJnyIf4vJPAhNPafKkWQiQJWA9Ii4=; b=SqXMDtQLgmKCaNxJOrptTVHYG3oIsou2kc3kO5PJ60as6focwSWhTqRulJZJq3+Lqa /H/gJgnoIxyBFpeIKDa/qPKa6v1/lCJ1M+czVADETsbIDeg4RDV7myU7gZgesTf+Od0E CfUkdXOVD42SKLNaSWT8ePnS0Sns1MTbD0Ugk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kRaL0/ZsaDxs5/SJnyIf4vJPAhNPafKkWQiQJWA9Ii4=; b=imxknRuhALI+DBQX4NWnm6AM3Hz+ILcd31RCc/yWtIT7iHTgGHMTgs7RoKE2Iprmw8 HgUALabNMT6PN0LWHxTMPJDizp3msY3ibQoVWJ7WwrGFlPUrQRz7n+WDLsRbgDvAf/ye 5AWWS8T37FkGohbtJLz/0hX0VJyPdU/+F2dZecKAGWRC1Lk0s9OA7tWxVbTGMEoIUfk9 c7t9VugADAHKHHfHbw0ZxDaiaARD282pINyKrPq6idTpqT1owra4VJ2Kxn7JMnYijzBZ 31UaQRdUtJ3EJs10Het1868IHWwRylGW5Oc6hundUznELD9n2jiGMSXQ2D0XsV5gIx/e EFqg== X-Gm-Message-State: APjAAAXmFhdKtf+MXT66BS18ZhlEkjm2DUpl9zGHJJC6DA8aWV6GHYRT xtE6rdpxfGlBUwsS0w98pl70qMhbewM= X-Received: by 2002:a05:620a:10b9:: with SMTP id h25mr19873845qkk.33.1566878706647; Mon, 26 Aug 2019 21:05:06 -0700 (PDT) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id o45sm9596172qta.65.2019.08.26.21.05.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Aug 2019 21:05:06 -0700 (PDT) Subject: Re: Adding a typo-checker for the .fc files of refpolicy To: Nicolas Iooss , selinux-refpolicy@vger.kernel.org References: From: Chris PeBenito Message-ID: Date: Tue, 27 Aug 2019 00:05:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 8/18/19 4:38 PM, Nicolas Iooss wrote: > Hello, > > After introducing a buggy file context in the policy (which will be > fixed with https://github.com/SELinuxProject/refpolicy/pull/66), I > decided to write a typo-checker for the .fc files. I am re-using some > code I have already written in order to label files in /usr/bin > correctly on Arch Linux (I wrote this for > https://github.com/SELinuxProject/refpolicy/pull/19). It seems it > already caught another issue in policy/modules/services/monit.fc. The > "s9" seems to be a misspelling for "s0" in: > > /etc/rc\.d/init\.d/monit -- > gen_context(system_u:object_r:monit_initrc_exec_t,s9) > > Is there an interest in having such a script in the repository? If What are the checks? > yes, in which directory? > > In my humble opinion, it would be nice to have such a script and to > make Travis-CI run it. I nevertheless feels uncomfortable with putting > it in the "support" directory, because it is not involved in building > or installing the reference policy. I am therefore suggesting creating > a new directory, named "bin" or "scripts". Such a directory would > contain scripts such as this typo-checker and some other scripts that > could be useful when working on refpolicy. What do you think about > this? "testing" might work too. -- Chris PeBenito