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=-8.2 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,URIBL_BLOCKED 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 3FD04C43441 for ; Sat, 10 Nov 2018 00:43:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF3F2204FD for ; Sat, 10 Nov 2018 00:42:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="JtS9Xu+A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF3F2204FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ieee.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728082AbeKJK0D (ORCPT ); Sat, 10 Nov 2018 05:26:03 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:41636 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727730AbeKJK0D (ORCPT ); Sat, 10 Nov 2018 05:26:03 -0500 Received: by mail-qk1-f196.google.com with SMTP id 189so4841902qkj.8 for ; Fri, 09 Nov 2018 16:42:58 -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=X9Qs/IUHvsJMcVzY3u8tV6TUqKZ/rVGJDEh4DpUcGaI=; b=JtS9Xu+AuIpGjI3UxcR1FSQh7EDT8BFfoqfIRRiGO5jCs0qtB/79wx9f+wKf9fCLA/ KmpB6PaqLo6pqegtwAQJGOGOGhfwJr5NJ2LaVIWhZjJwGdt1Pin/T4hgWTZqibKjwFMC lZh2kPjYNx9R++2B3EGtDbGAnnv6cda6onOcQ= 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=X9Qs/IUHvsJMcVzY3u8tV6TUqKZ/rVGJDEh4DpUcGaI=; b=d3D8CLKOmwriH46ZsHp7FSZ3kcET+cAX8Vk/xnc8lUarOlSXlr/JlStLgarmoSbAk0 8gA9Oy0WZym5k7nJGs0LLDn90Uco0XIGqAhnVIFg6GF+0EdzTXODQZ0FNLaefAnbwCeU fODfgxz8LV4LOmkV2z5uEH6VXC8tmn4T0MC3N9UYQgFP/5hBguJn0rCPXYFfrS1tpfJS pfRu0aNgEsuGRzJDvEPz/54HQ97/aJvg4n6XXECBBR5uBCj2visO/c9VBvzr6a/g/v8v m8cAETIeFsLoS73lzjIcCDPI4bymoTHJmUjpWyhLP0MxuRsNuNXNpm3OI5qf5dmDB6aw m4AA== X-Gm-Message-State: AGRZ1gKsZjphhJMJZ6U+JxtlfhIHA0e4vyPxB2yEcg6ej+/Zh0JIOR8k twoeMuv9HtKYaCNdsRWsTKzyTRJbXv1IWOcc X-Google-Smtp-Source: AJdET5eYbO9tqZ9QKRbvsgJFZiIzUXG1KKCm/g3UqH11jIH8elRKvGmPcufZqL7U0zLpo7XiernCJQ== X-Received: by 2002:a0c:d80f:: with SMTP id h15mr11055765qvj.228.1541810577677; Fri, 09 Nov 2018 16:42:57 -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 k38sm5891857qkh.72.2018.11.09.16.42.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 16:42:56 -0800 (PST) Subject: Re: [PATCH 1/1 v2] Add interface udev_run_domain To: David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181102003607.22300-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: <4a3d1ee9-9277-1cfd-4cf4-ce2e123a2722@ieee.org> Date: Fri, 9 Nov 2018 19:04:38 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181102003607.22300-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 11/01/2018 08:36 PM, David Sugar wrote: > This interface is useful when using the 'RUN' option in UDEV rules where udev will be executing a user executable to perform some action. This interface allows a domain transition to occur for the run action. > > Signed-off-by: Dave Sugar > --- > policy/modules/system/udev.if | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/policy/modules/system/udev.if b/policy/modules/system/udev.if > index a2067895..fee55852 100644 > --- a/policy/modules/system/udev.if > +++ b/policy/modules/system/udev.if > @@ -36,6 +36,37 @@ interface(`udev_domtrans',` > domtrans_pattern($1, udev_exec_t, udev_t) > ') > > +######################################## > +## > +## Allow udev to execute the specified program in > +## the specified domain. > +## > +## > +##

> +## This is a interface to support the UDEV 'RUN' > +## command. This will allow the command run by > +## udev to be run in a domain other than udev_t. > +##

> +##
> +## > +## > +## Domain to execute in. > +## > +## > +## > +## > +## Domain entry point file. > +## > +## > +# > +interface(`udev_run_domain',` > + gen_require(` > + type udev_t; > + ') > + > + domtrans_pattern(udev_t,$2,$1) > +') Merged. -- Chris PeBenito