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 24077C43381 for ; Fri, 8 Mar 2019 00:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7B2A2081B for ; Fri, 8 Mar 2019 00:03:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="T8vZLA6J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726234AbfCHAD0 (ORCPT ); Thu, 7 Mar 2019 19:03:26 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:38574 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbfCHAD0 (ORCPT ); Thu, 7 Mar 2019 19:03:26 -0500 Received: by mail-qk1-f194.google.com with SMTP id z3so3016965qkf.5 for ; Thu, 07 Mar 2019 16:03:26 -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=sadKgbQJTkzppiTPE4KB9AkqUa9hbMpR356O4szhaOM=; b=T8vZLA6JMGB16/KdeEzYJQ2pvlFq200XKULWW5dH1rtAQTvskW9BGH0hfMrmFlfIs9 SJ+xcK9k7Qi1Dj/RPMi0eWw3Kk2UPMZLTCHXt/98NadBH+b17OdpeCuX5xRn5OCXdRmV V3Goq4R8/3CC7rIcvYD/wKJQ3+BxirPYutEdY= 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=sadKgbQJTkzppiTPE4KB9AkqUa9hbMpR356O4szhaOM=; b=fdAadxIRlscJOxpA8pJh/Q1kTOv+hWq4ElW4Q4nbPLh8uRsphg9qxuQ1uhHY1oqU/m YREDMamRs/nLNgqvV0Bc9qiiLYiR3MznQ8xLeeuukAZVv7G0sUhQ62ATg7N3Ax2vvTsv E+oGqwFCak0g1wqYALGlB7qqc2YKqXUUwSy1ai+esl5wqyo0R/pAyXTdSSbXPxqai3Do 7d9bvjDFl/8kl5o2fBtnbwxV6QlLssIxv2Gmh9R1j5f1++e7vNyxS4WDxbw6sA9Up47x kvOp6kTMqhogzdJ8dGTH+ct6oyhfM243iqc0JlsVMd64rJPgsPGdoMq9cKE9C1j/4jin 5ajg== X-Gm-Message-State: APjAAAVqKZmKYDqHsXk/Rn4vgESqJFXnXd35ViqRi7KtAebPHQtrvG/Y 0Ng3sdO22T2Fc2MTDASO2veM3p40KyY= X-Google-Smtp-Source: APXvYqyyZiVuCk9R5EqA+7yffipO2pik5t6nutRB88Zwc1yyiTD9HBcNmqkRW3z3obyeXeR3Jfuvjw== X-Received: by 2002:a37:a09:: with SMTP id 9mr11328606qkk.341.1552003405459; Thu, 07 Mar 2019 16:03:25 -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 i33sm4090887qti.74.2019.03.07.16.03.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 16:03:25 -0800 (PST) Subject: Re: [PATCH v2] Add interface udev_run To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190306190618.9089-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: Date: Thu, 7 Mar 2019 18:55:54 -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: <20190306190618.9089-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/6/19 2:07 PM, Sugar, David wrote: > Altered to use roleattribute based on suggestion > > Signed-off-by: Dave Sugar > --- > policy/modules/system/udev.if | 26 ++++++++++++++++++++++++++ > policy/modules/system/udev.te | 2 ++ > 2 files changed, 28 insertions(+) > > diff --git a/policy/modules/system/udev.if b/policy/modules/system/udev.if > index fee55852..90dfb17d 100644 > --- a/policy/modules/system/udev.if > +++ b/policy/modules/system/udev.if > @@ -36,6 +36,32 @@ interface(`udev_domtrans',` > domtrans_pattern($1, udev_exec_t, udev_t) > ') > > +######################################## > +## > +## Execute udev in the udev domain, and > +## allow the specified role the udev domain. > +## > +## > +## > +## Domain allowed to transition. > +## > +## > +## > +## > +## Role allowed access. > +## > +## > +## > +# > +interface(`udev_run',` > + gen_require(` > + attribute_role udev_roles; > + ') > + > + udev_domtrans($1) > + roleattribute $2 udev_roles; > +') Why is a user be starting this? -- Chris PeBenito