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.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 3A3BAC43381 for ; Wed, 20 Feb 2019 03:31:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06BB32146F for ; Wed, 20 Feb 2019 03:31:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="gClICxwX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727085AbfBTDb5 (ORCPT ); Tue, 19 Feb 2019 22:31:57 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42844 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbfBTDb5 (ORCPT ); Tue, 19 Feb 2019 22:31:57 -0500 Received: by mail-pg1-f195.google.com with SMTP id b2so5400996pgl.9 for ; Tue, 19 Feb 2019 19:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=yp8HvPnWkaDitSViw6+gJZ1LxF7GQAnWCexEyKJ5LG0=; b=gClICxwXU7ptbBcS0X04jg5DnP3iHcSh1v7dqti5JRqxpuNUF3WeVOHXRa4TmfT6t7 4NRWxAnNzyAMkF53psD0xQSNqb74KaM3EinOzPx0Q29fJfu/J+stUX9UdqlCitWc/QpG hLI3/eALlDbsNVHGlVUyhj4jbDh5LYGAaTLXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=yp8HvPnWkaDitSViw6+gJZ1LxF7GQAnWCexEyKJ5LG0=; b=lO9anRdEAsKfAZio3qpgfXHcO52RLApwWnEI5rz2qmQF3Z8sFI+7HC6/+9ov1jQITT iUkgeN/FkAtTh9heHUvuKZ+PkJECCvSwROJ0603rIscMonACe9JIS4zDz64rJFwG9uPI HZF+CoR4HOZxnEdaygscuCHcNWqWS3JZ0MdQxpen7m0kVWr5EpyHGfk+TOiOeMTFa05C oYcjB6nbXgdepyeEGfoM9AVLP3jplKvxFp3P+xX0JiJHI1rW+PmRsLwdGyAtFyDjkjR0 6noXvwjEyP/hebnAkh2utAeHTpqiV2OeYvu9kPCEidY5Z9dSnZXOxHHZMdSEjEw/OMuH PYow== X-Gm-Message-State: AHQUAubVMZa06e/E9LmFmIt+yLdIR5eGi0RXRv+5noLRIShLiDfNXNI7 jLJhjdl/xJhkp+QbHDkkz8BqjLcUqXpl3YtC X-Google-Smtp-Source: AHgI3IblzR5Y1IApyGyhv8R8ybkThQCdkcGmr9h9CNcB06Lu1Pm3ogt+1YCe3XcRY0vwKmBCopBNsg== X-Received: by 2002:a63:9712:: with SMTP id n18mr26734241pge.295.1550633516977; Tue, 19 Feb 2019 19:31:56 -0800 (PST) Received: from lenovo.pebenito.net ([173.239.195.26]) by smtp.gmail.com with ESMTPSA id 10sm31808654pfq.146.2019.02.19.19.31.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 19:31:56 -0800 (PST) Message-ID: <076c9f96f58d7e7e022dff3d9d8476650f8d7b1d.camel@ieee.org> Subject: Re: [PATCH] Add interface to run cdrecord in caller domain From: Chris PeBenito To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" Date: Tue, 19 Feb 2019 19:31:56 -0800 In-Reply-To: <20190218200017.4439-2-dsugar@tresys.com> References: <20190218200017.4439-1-dsugar@tresys.com> <20190218200017.4439-2-dsugar@tresys.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Mon, 2019-02-18 at 20:00 +0000, Sugar, David wrote: > Signed-off-by: Dave Sugar > --- > policy/modules/apps/cdrecord.if | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/policy/modules/apps/cdrecord.if > b/policy/modules/apps/cdrecord.if > index fbc20f69..ba81fb1a 100644 > --- a/policy/modules/apps/cdrecord.if > +++ b/policy/modules/apps/cdrecord.if > @@ -30,3 +30,22 @@ interface(`cdrecord_role',` > allow $2 cdrecord_t:process { ptrace signal_perms }; > ps_process_pattern($2, cdrecord_t) > ') > + > +######################################## > +## > +## Execute cdrecord in the caller domain. > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`cdrecord_exec',` > + gen_require(` > + type cdrecord_exec_t; > + ') > + > + corecmd_search_bin($1) > + can_exec($1, cdrecord_exec_t) > +') Merged. -- Chris PeBenito