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.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 48620C43387 for ; Thu, 3 Jan 2019 05:16:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 017922073D for ; Thu, 3 Jan 2019 05:16:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=perfinion-com.20150623.gappssmtp.com header.i=@perfinion-com.20150623.gappssmtp.com header.b="s1O3V0Gx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbfACFQR (ORCPT ); Thu, 3 Jan 2019 00:16:17 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39072 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfACFQR (ORCPT ); Thu, 3 Jan 2019 00:16:17 -0500 Received: by mail-pg1-f193.google.com with SMTP id w6so15504050pgl.6 for ; Wed, 02 Jan 2019 21:16:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CyvBRcOTxXBolVtbwmYBUZJHQzh2PzrsvQpPjPFyxwI=; b=s1O3V0Gx5a8ccN9upRNayaEH3K8CzyfdjVOrVCWr6RDNrsiuChkxjbM3xZUkyj06Td ukQd41oP38sDoX4bD8QLIM5FI0K426yyBG8ODjnQcKN60XVbF6eWXSts5L+UqrpXjFE8 YFA1YyQLXNjjzYbIr51SvjJh1nLM6dxTNeuQ+oZcRosHJBPMzDuqYQlDlv3Xi0to9Ta6 t+pT2+VGODmmOTGwm/1mqYye1zuFZlRiZxBQ6877i8TpJOHsw/Fpuex0KQmpQ9ZNQsOw 9rpEmZYNb5Xr1zUwF6dGjgwT9HocPoKQtSsceSUS4W42I2ojI5xmEgK5V824wUJwd1Np uigQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CyvBRcOTxXBolVtbwmYBUZJHQzh2PzrsvQpPjPFyxwI=; b=WMZIHDt1RCx4+6c8wFKcUdVRiqNo0z7zxgRrZ2AJH8D6pw5bT64B7YYg2ZCVLVNjPd m1jvK57qmF9Hq0dLB4Dx42uzqY/FK7LsSd7q28L4PXhSlVkKzQGWktxtx4jXLioYY34/ tOsClzjTb0oD82ayFy8IWrzZsKpwrxZk4m+qg5hzpfyPdj58c3X+b9AMVEnJMsDqt14z g+Dgh3Jyra9k1mVX6hRWBRipRyXD+I4IkYh6YmbxjHo4lDXwjJjCSPOL+Gg9NftNOFN8 YDAKPIBFmNtJ1uIYJjw4hNOOCfarz77N1cccDsxN1ITzP12f42gelV7xQdRLbP2AxIg1 Wdjw== X-Gm-Message-State: AJcUukc53bVE37TDfir2SUIT6C9XDoq3fwTfAHuKe/0XLyxTIp3ntRtd XliE8ZbY58klR6JU2h4vLZ2i7g== X-Google-Smtp-Source: ALg8bN4q35f7yUR43XTPmCvP5p1GaQR25PmX0bYzejaWHv07niNO/71f3BO3NtCoxbhZmO+pbHg56A== X-Received: by 2002:a63:c0f:: with SMTP id b15mr16088964pgl.314.1546492576518; Wed, 02 Jan 2019 21:16:16 -0800 (PST) Received: from localhost ([2404:e800:e600:1fc:f072:7b1b:4fe9:51b7]) by smtp.gmail.com with ESMTPSA id i1sm81578209pgb.46.2019.01.02.21.16.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 21:16:15 -0800 (PST) Date: Thu, 3 Jan 2019 13:16:14 +0800 From: Jason Zaman To: Chris PeBenito Cc: Russell Coker , selinux-refpolicy@vger.kernel.org Subject: Re: [PATCH misc 2/3] selinuxutil sysnetwork consolekit apt dpkg udev iptables logrotate, and gpm Message-ID: <20190103051614.GB19860@baraddur.perfinion.com> References: <20190102084500.GB31076@aaa.coker.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Wed, Jan 02, 2019 at 07:07:19PM -0500, Chris PeBenito wrote: > On 1/2/19 3:45 AM, Russell Coker wrote: > > Lots of little stuff. > > > > Also the sysnet_dns_name_resolve() change the previous patch needed. > > > [...] > > > --- refpolicy-2.20180701.orig/policy/modules/services/consolekit.te > > +++ refpolicy-2.20180701/policy/modules/services/consolekit.te > > @@ -27,7 +27,7 @@ init_daemon_pid_file(consolekit_var_run_ > > # Local policy > > # > > > > -allow consolekit_t self:capability { chown dac_override fowner setgid setuid sys_admin sys_nice sys_ptrace sys_tty_config }; > > +allow consolekit_t self:capability { chown dac_override dac_read_search fowner setgid setuid sys_admin sys_nice sys_ptrace sys_tty_config }; > > Since you're getting the dac_read_search denial, the dac_override > probably isn't necessary anymore. Can you retest without it? No, consolekit definitely needs dac_override. It needs to be able to nuke /run/user/1000/*. it perhaps doesnt need to read only nuke but i'd say grant the perm instead of dontaudit makes things easier if doing semodule -DB. > > > > [...] > > =================================================================== > > --- refpolicy-2.20180701.orig/policy/modules/system/udev.te > > +++ refpolicy-2.20180701/policy/modules/system/udev.te > [...] > > > @@ -328,6 +324,11 @@ optional_policy(` > > ') > > > > optional_policy(` > > + iptables_domtrans(udev_t) > > + iptables_write_pipe(udev_t) > > I'm not clear why this separate pipe interface is necessary, as that > access should be provided by the domtrans interface already. > > > > --- refpolicy-2.20180701.orig/policy/modules/system/iptables.if > > +++ refpolicy-2.20180701/policy/modules/system/iptables.if > > @@ -25,6 +25,24 @@ interface(`iptables_domtrans',` > > > > ######################################## > > ## > > +## Allow iptables to write to a pipe > > +## > > +## > > +## > > +## Domain to be written to > > +## > > +## > > +# > > +interface(`iptables_write_pipe',` > > Should be iptables_write_inherited_pipe(). > > > + gen_require(` > > + type iptables_t; > > + ') > > + > > + allow iptables_t $1:fifo_file write; > > +') > > + > > -- > Chris PeBenito