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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 006F4C3A589 for ; Sun, 18 Aug 2019 20:38:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C52FC2054F for ; Sun, 18 Aug 2019 20:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbfHRUi1 (ORCPT ); Sun, 18 Aug 2019 16:38:27 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:38503 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbfHRUi1 (ORCPT ); Sun, 18 Aug 2019 16:38:27 -0400 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 7C1B95648C4 for ; Sun, 18 Aug 2019 22:38:24 +0200 (CEST) Received: by mail-ot1-f41.google.com with SMTP id w4so14120472ote.11 for ; Sun, 18 Aug 2019 13:38:24 -0700 (PDT) X-Gm-Message-State: APjAAAX6ojhnNNZZZn6/BsWrVAf+T8b6ob690Drf+IbzLzpednePeKIp OPAGAAEJ5xlSXAZ8mpFCfF46syKw1LSNnOyW21Y= X-Google-Smtp-Source: APXvYqxJrPmKR2HlNtW/LgTXVY48QE4JNN9/1jZ/VQKxi7b56dbPEBJYm0Gf5LcwwedQmp+8uhaGK5ZhBd9LOJ35w5Q= X-Received: by 2002:a9d:7f90:: with SMTP id t16mr16613135otp.92.1566160703661; Sun, 18 Aug 2019 13:38:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nicolas Iooss Date: Sun, 18 Aug 2019 22:38:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Adding a typo-checker for the .fc files of refpolicy To: selinux-refpolicy@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sun Aug 18 22:38:24 2019 +0200 (CEST)) X-Org-Mail: nicolas.iooss.2010@polytechnique.org Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org 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 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? Thanks, Nicolas