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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 629C0C43441 for ; Sat, 10 Nov 2018 00:43:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 297132081C for ; Sat, 10 Nov 2018 00:43:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="XGR/G8gq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 297132081C 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 S1728188AbeKJK0O (ORCPT ); Sat, 10 Nov 2018 05:26:14 -0500 Received: from mail-qk1-f177.google.com ([209.85.222.177]:43671 "EHLO mail-qk1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727730AbeKJK0N (ORCPT ); Sat, 10 Nov 2018 05:26:13 -0500 Received: by mail-qk1-f177.google.com with SMTP id r71so4842631qkr.10 for ; Fri, 09 Nov 2018 16:43:09 -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=WSh7j/3nhxUL2iRzKrNK02RvhVGoQV0cdDijSZ9p93o=; b=XGR/G8gqBbujQrbc4lUOzKuKJEC35iM4RoO5yL1Pk3G+5l8x1Y0HFqJT5cGpt3XRkS YBaGNEgyPdEIgx79hGj1LDFNbxmZx3uhhyHGIaquaVZa6n011F7mJOgqDgRrL/AS6Yyt jGt6mG3Z67xGeYrMXrDt9ZAu4V1u6yb9FskXg= 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=WSh7j/3nhxUL2iRzKrNK02RvhVGoQV0cdDijSZ9p93o=; b=EdeX8gyaZue/lZjeQF1gfDdxE7VkGU9nDgjOXj+4v3pZPhYdwfQZrm4T1k7qA/7PDD o/x/9xGxxIaamdtjpmB0SM/r/dearOAq+R/B9LUOmJe0xuFLrC5Hn2ldS6ypOhdqbkGA reZQvOldyrf54JuXW3CujVc36InwRVEmN3s7Co+9HRq0dk+KF1ZxFamkPL5K3qbZoZ5O ThJz+UngXbK7iER5lOHt6yB/jZj2K+E87h4iFzXhF7Z0JIiPm0Xa8KLauMMcfU4SJPzp +6XoivPDKkpxSXZMPIawcK40+/NAKu32HLKtqMR8jHp1YmI0+TaG6C6keYvSf9N0lIsH Eo8g== X-Gm-Message-State: AGRZ1gIQ1q8YIfo5ltTOO9Ia9Yrk3QwXohVWetnrricmmdTZY2oHMy3C n4dO9e9wlF/1RtBkUsbT6FiAPIZaWT/AbSh0 X-Google-Smtp-Source: AJdET5e7fqGI0M8nKW6fNjwy2qUAEJCZEYlfr4GOgTSC2QFQhAqgcYR1oW66UFYzhNpk126cDE3M5A== X-Received: by 2002:a0c:c993:: with SMTP id b19mr10471281qvk.126.1541810588373; Fri, 09 Nov 2018 16:43:08 -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 h49-v6sm6658034qth.32.2018.11.09.16.43.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 16:43:07 -0800 (PST) Subject: Re: init_daemon_domain vs init_spec_daemon_domain To: Luis Ressel , selinux-refpolicy@vger.kernel.org References: <20181108001419.0d06cd9b@vega.skynet.aixah.de> From: Chris PeBenito Message-ID: <0664b97f-dd55-51a3-41ef-c3f1f69bc7a9@ieee.org> Date: Fri, 9 Nov 2018 19:22:22 -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: <20181108001419.0d06cd9b@vega.skynet.aixah.de> 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/07/2018 06:14 PM, Luis Ressel wrote: > Hello *, > > I've noticed the init_daemon_domain and init_spec_daemon_domain > interfaces contain quite a bit of duplicated code. As can be seen from > the patch I just [two weeks ago, but this mail unfortunately didn't go > out back then due to a problem on my end] posted, this has already > caused bugs. > > Ideally, init_daemon_domain should just call init_spec_daemon_domain > and only add a typetransition statement on top of it. However, this is I'm inclined to accept a patch that will make this so, regardless of the below concerns, since there are no usages in refpolicy. > currently not possible because those two interfaces differ in some > aspects: > > * i_d_d grants the daemon nscd_use() permissions, while i_s_d_d > doesn't. This is most likely an oversight too. > > * i_d_d permits transitions from initrc_t to the daemon domain, while > i_s_d_d permits transitions from init_t. This is thoroughly odd. My > expectation was that i_s_d_d would allow transitions from initrc_t > too, and as far as I understand the situation, transitions directly > from init_t do a daemon domain only happen with systemd. > > * The ifdef(init_systemd) blocks of the two interfaces are very > different. Could someone familiar with the systemd policy please > comment on this? > > * i_s_d_d obviously grants init_t (and initrc_t if that is added in the > future) self:process setexec permissions, while i_d_d doesn't. This > makes sense, of course, but if we can fix the three other differences > I already mentioned, I don't believe this difference alone should > block my proposed change. > > Thanks, > Luis > -- Chris PeBenito