From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 613FCC43444 for ; Sun, 6 Jan 2019 19:14:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 320EB20859 for ; Sun, 6 Jan 2019 19:14:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="abQXNNZ/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbfAFTOh (ORCPT ); Sun, 6 Jan 2019 14:14:37 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39718 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfAFTOh (ORCPT ); Sun, 6 Jan 2019 14:14:37 -0500 Received: by mail-qt1-f193.google.com with SMTP id u47so40990449qtj.6 for ; Sun, 06 Jan 2019 11:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fzWw8KVtKJ8Kmv0rWdvWNwtQgQHWXcD6pv9X2u4A/xE=; b=abQXNNZ/F5LMHECRp9jZ70cvmVqHS9Z+BO6eUbOkOGxwweGgbZSp4U2ZU+tZflQyZQ zYMaZfoUxEozHFeWiILQgyH+OfQElE5MVoPkAPqKYG/RMx+He5MvfyTydvUJYrFPL4fu XX/0jwGfmYCltAkeCTMcYkFaUy/5WAaJ4EQWQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fzWw8KVtKJ8Kmv0rWdvWNwtQgQHWXcD6pv9X2u4A/xE=; b=XBJZH6fx7bsrB0D6ftEI7Na/zlNF0CIlLHnjuEm+R5es1NnIbqXP/rpUw2Tkxd535L KowUt6HG54+Z2r+5lzEZorbLZrrz3qWXYTIbcHWzZc1EbkaF7sqiR4e3m55U+z/Abvb0 tEKG0XWGY2Pk+7ouYZFgUwJgdPV9Ob8FuCJnKWCb4tcBQVsNBNFsQOHZGJtIxCfH2jdn LO+6Aa/Ctv5O3QfEfgarEjRKc/KmW1RGV6ZofXhivMr8/dQI8lGAVDx+TvM39JwcF86X uczLz+aItl0QoSRca9I7KZvEgN+fVsB//mGaOxhlHTvF91xT2oe1QufOOzs8TwCgX8bl /fDA== X-Gm-Message-State: AJcUukcd37VAMU3II9ncVoBuuX+MnZmbaCSGeYN0vXEanpzuo6PAZv/y M/M1je9ToJs/OLCbdfNlaGK4v+AQCRY= X-Google-Smtp-Source: ALg8bN6+DQ5kRfSqmBt47EeIsKE8MtgQoyQjOxDjYjzduDf6HVP/9R1cEa0vbuUkkph4OiI+siJ0cA== X-Received: by 2002:a0c:c927:: with SMTP id r36mr59394614qvj.51.1546802076303; Sun, 06 Jan 2019 11:14:36 -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 a2sm8102664qkk.4.2019.01.06.11.14.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jan 2019 11:14:35 -0800 (PST) Subject: Re: [PATCH] last misc stuff To: Dominick Grift , Russell Coker Cc: selinux-refpolicy@vger.kernel.org References: <20190104073503.GC11256@aaa.coker.com.au> <13114899.BBxJTFboZp@xev> <87h8em8cc9.fsf@gmail.com> From: Chris PeBenito Message-ID: <109b5fe6-c75a-ce12-eefc-b849b233988f@ieee.org> Date: Sun, 6 Jan 2019 13:22:35 -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: <87h8em8cc9.fsf@gmail.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 1/6/19 2:38 AM, Dominick Grift wrote: > Russell Coker writes: > >> On Sunday, 6 January 2019 6:04:14 AM AEDT Chris PeBenito wrote: >>>> Index: refpolicy-2.20180701/policy/modules/admin/apt.fc >>>> =================================================================== >>>> --- refpolicy-2.20180701.orig/policy/modules/admin/apt.fc >>>> +++ refpolicy-2.20180701/policy/modules/admin/apt.fc >>>> @@ -1,9 +1,12 @@ >>>> /etc/cron\.daily/apt -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) >>>> >>>> -ifndef(`distro_redhat',` >>>> +/usr/bin/apt -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) /usr/bin/apt-get -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) -/usr/bin/apt-shell >>>> -- gen_context(system_u:object_r:apt_exec_t,s0) /usr/bin/aptitude >>>> -- gen_context(system_u:object_r:apt_exec_t,s0) >>>> +/usr/sbin/update-apt-xapian-index -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) + >>>> +ifndef(`distro_redhat',` >>>> +/usr/bin/apt-shell -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) /usr/sbin/synaptic -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) >>>> /usr/lib/packagekit/packagekitd -- >>>> gen_context(system_u:object_r:apt_exec_t,s0) /var/cache/PackageKit(/.*)? >>>> gen_context(system_u:object_r:apt_var_cache_t,s0) >>> I modified some of these changes, as it results in file context >>> conflicts with the RPM module. More accurately, I removed the fc >>> entries in RPM that label the apt executables. I moved the apt-shell >>> back out of the ifndef block. >>> >>> I think the synaptic and packagekit fc entries, which are in both apt >>> and rpm modules, may need to be dropped and move to the distro's >>> patches. Either that, or this ifndef needs to turn into ifdef debian >>> (or something else). >>> >>> Otherwise merged. >> >> I agree that things should be reconsidered with apt policy. >> >> Do we even need separate apt and rpm policy given that both package managers >> have access to write everything and change config files? > > AFAIK, apt can probably just be part of the rpm domain. Heck even dpkg > can be. The only thing , i think, that in that case should be taken care of > is to make a typealias rpm_script_t dpkg_script_t because dpkg has > selinux awareness and wants to manually transition to dpkg_script_t to > execute the scriptlets I'd be open to merge the two modules, if they're similar enough. I'd be nice to compare the two modules more deeply; unfortunately one feature I haven't reimplemented from setools3 was the type relationship analysis, which would be perfect for this. -- Chris PeBenito