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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 B647FC10F03 for ; Fri, 8 Mar 2019 00:03:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 850342081B for ; Fri, 8 Mar 2019 00:03:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="YmEXY3MJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbfCHADZ (ORCPT ); Thu, 7 Mar 2019 19:03:25 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:45957 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfCHADZ (ORCPT ); Thu, 7 Mar 2019 19:03:25 -0500 Received: by mail-qt1-f193.google.com with SMTP id d18so19339749qtg.12 for ; Thu, 07 Mar 2019 16:03:24 -0800 (PST) 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=ZCmExfhjAhh6+JK4jqg8zYUJf7cdA7iw4oudwl3JQN0=; b=YmEXY3MJhLXSzCxm9+Kfyiqu9iZnevWkyrS+6cosqVpD6u247oULpMOVaD61JOSuJe NfFOBS+OfdqZcErTGL+auqVxvzyI/yiw/o83UwNPTfnKpmyi9oJzxoPo4s51a0SF1ckl KfEcDNA1R9oArUcR4re3Hn+LVCU89sYztkEZU= 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=ZCmExfhjAhh6+JK4jqg8zYUJf7cdA7iw4oudwl3JQN0=; b=YZnkpIMZpaEU8lpKJblI3FZwQNTMzLbW86sRdHyqw8hOKwwanBlWkRww5ArX7plLB2 ObSl6H8ceGTSt+IiSUveSxHOee/J+yNfoaXqmwZjhgpL4sa88h/v0gBgocnEkoR0I2uR BX7e6fcbyhDQkeoLGaQG0IduWURKDHFO0kh2pcdh27TS+eO8r3pR5VcrLYIJ/Z4/aFju uXIwl1hoEUh29Wm1uIf7Aes4fC7SceRxxj72Tbt3jBrf+zUwH0jxkiKnuSfyVht92mTA jIohZxb0PUNbZtp6I5dsQO7+qdi9CwOGHHk6OkfJUO/+F7pNCb3rBzkqtn4Ox9Om7uSE U8bg== X-Gm-Message-State: APjAAAXen4H2uT4+qjoY4kVItsYFXbjAhkUfm3zhBufHUwQ4IqYuZsRh SX8AytAbbKqc1+CiTTZks/VLcOvKZYU= X-Google-Smtp-Source: APXvYqx97ii8crDkIsy985ePT6MmO3LccuZDur/PuDBslGyNXybRwVaK0CzUmFoaRRrMmo6YuWVc1Q== X-Received: by 2002:a0c:ad67:: with SMTP id v36mr12975120qvc.5.1552003403746; Thu, 07 Mar 2019 16:03:23 -0800 (PST) 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 24sm4169934qtu.17.2019.03.07.16.03.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 16:03:23 -0800 (PST) Subject: Re: [PATCH] Add interface to allow relabeling of iso 9660 filesystems. To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190305223209.18922-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: <49941fbb-0b1e-0a67-3c48-7f777daad37d@ieee.org> Date: Thu, 7 Mar 2019 18:55:46 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190305223209.18922-1-dsugar@tresys.com> 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 3/5/19 5:32 PM, Sugar, David wrote: > I have a case where I'm labeling media with my own types to control > access. But that is requiring that I relabel from iso9660_t to my > own type. This interface allows that relabel. > > type=AVC msg=audit(1551621984.372:919): avc: denied { relabelfrom } for pid=9717 comm="mount" scontext=staff_u:staff_r:mymedia_sudo_t:s0-s0:c0.c1023 tcontext=system_u:object_r:iso9660_t:s0 tclass=filesystem permissive=0 > > Signed-off-by: Dave Sugar > --- > policy/modules/kernel/filesystem.if | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if > index 048b9d65..a22cb6ba 100644 > --- a/policy/modules/kernel/filesystem.if > +++ b/policy/modules/kernel/filesystem.if > @@ -2505,6 +2505,25 @@ interface(`fs_remount_iso9660_fs',` > allow $1 iso9660_t:filesystem remount; > ') > > +######################################## > +## > +## Allow changing of the label of a > +## filesystem with iso9660 type > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`fs_relabelfrom_iso9660_fs',` > + gen_require(` > + type iso9660_t; > + ') > + > + allow $1 iso9660_t:filesystem relabelfrom; > +') > + > ######################################## > ## > ## Unmount an iso9660 filesystem, which Merged. -- Chris PeBenito