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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 CC66DC43387 for ; Sun, 6 Jan 2019 07:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9144721903 for ; Sun, 6 Jan 2019 07:38:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EVP56Xyc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbfAFHiu (ORCPT ); Sun, 6 Jan 2019 02:38:50 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:40228 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbfAFHiu (ORCPT ); Sun, 6 Jan 2019 02:38:50 -0500 Received: by mail-ed1-f68.google.com with SMTP id g22so35117970edr.7 for ; Sat, 05 Jan 2019 23:38:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=BOAYIL9T6mpJbXG1lGC5uwa9kyHID0ZvYfkSrwy6dhc=; b=EVP56Xyc9vH+ZL+wq3ODzSMdOwy4sW+nERKG8Oae58uGj+ceGYvapbStfAxM/zsjWW g8h8RDNZLZlgDtTltkvg/PvdUN8jWqpE4qMXs7K8SbH3+T7gFR47oy3+Vne6fEEWM6he SK6QLCLXMPF3ZotSxfcPUF7jzWvfYfHmIt2WFwD/JckZTbRyBBKp2xEJTYFEpNecBQv5 k1QVxXs7lVHAGbvwDeFbQ57qaYn+mfAmE8+fDec5z3qzOSOcYTNlfnpSPpsisVH9egdw N4CLqBWqv4VTv/QD0EFsajK7tpbLLdMUOvujOXEhYyS8gDT7FBn41R9dLx0N5jijfAxn t0gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=BOAYIL9T6mpJbXG1lGC5uwa9kyHID0ZvYfkSrwy6dhc=; b=iLY86MAIO4knSuSVx67A580oUHsAqzjO3bjaL5sJ2ioN8/OIv+wj4tPfHh80qosbX/ sEoT2KXSiZ3JbN5pKoSzg7eFwEif8BQDmvM6S9OkDT9D5j5yvMDQBWWIbA5iBsHouXbZ hq74RAk/TqV5/5QMuirMCGdvGI88SKWyJS3ik4e0aUacrJfKMJbr7RefVfToL5iSY1E5 zvLcSoaqA//P6ufzo3/ftzTey8TKondYOBW5AOBztyZOvLlkiXJVFUz6uLT8NXvcsog9 LuT8waNZ5GJ8PLt/WpHqo4KiY6z2xQdBqMd3ey5bnaQNWvOrUzAiRTqB19/rEi1nLPiA 4rpg== X-Gm-Message-State: AA+aEWayAWnw/9NLo33GqmW3KTBnMKpPzxCBnHnH9udsgnI81kHSqDMK igg8bpkNlCyYtAxxxtO15R85gkvA1o8= X-Google-Smtp-Source: AFSGD/VJtIgRnp8qHQh52364iDRG3plgOeeiBFtinm8eFrxt1/e4zQ+gIGtTGfw/i/cK4yGWZ3372w== X-Received: by 2002:a17:906:4204:: with SMTP id z4-v6mr44224292ejk.13.1546760327183; Sat, 05 Jan 2019 23:38:47 -0800 (PST) Received: from brutus ([2001:985:d55d::438]) by smtp.gmail.com with ESMTPSA id d5sm26253911edb.48.2019.01.05.23.38.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Jan 2019 23:38:46 -0800 (PST) From: Dominick Grift To: Russell Coker Cc: Chris PeBenito , selinux-refpolicy@vger.kernel.org Subject: Re: [PATCH] last misc stuff References: <20190104073503.GC11256@aaa.coker.com.au> <13114899.BBxJTFboZp@xev> Date: Sun, 06 Jan 2019 08:38:46 +0100 In-Reply-To: <13114899.BBxJTFboZp@xev> (Russell Coker's message of "Sun, 06 Jan 2019 13:22:02 +1100") Message-ID: <87h8em8cc9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org 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 -- Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift