Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp847715ybp; Fri, 11 Oct 2019 05:25:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwISQ01Vig79PKw4qMVTnS7s7P95ENyJgiPiwGHB9vbBRvhDqNd2c1/vv9cHhv0G6p9gAE7 X-Received: by 2002:a05:6402:28c:: with SMTP id l12mr13527094edv.145.1570796708869; Fri, 11 Oct 2019 05:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570796708; cv=none; d=google.com; s=arc-20160816; b=CNS6+I23Uy1H0kV6H/MVlTjoRye/cg+4J2dt2Rnt6ktEwBZye5MQjsEQETSRudo+jo GRkrX1MYhOrT4NLrKssZpa94KLuuHQBR1NhS/aWb5Ps7esNastec0G9FUZyyEO9S4ROk KCm02teNnPMnAfjjR4H+eH0cV2+OH/oWd+qbOfSQXPllcZOReHttVGB4e18Mbd/sB064 qmaJ3rko93Mo/3l4lOLJBABRw+zAJs20+gpz+SD9rwFyvOuQYD6nYd7gaku/irPOivFo KQxrmDaXQpjGVWBTsk1LkU1Gx34727hLLMygAWKwjfcRS3svsyGau596NWyxyxRx1hFy uJUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=0VzdzNAO5c9OXKA/+R+DnwgRVNT6Y85IzdKgri3oZg0=; b=BwEz2M7hN9huwi1kw8uTljUO1tzkYL76jiSmcwrni/+yPfoBMgXsNiKcgTynaRvTpX Slix+/rTAJAOHJ6vixxauEhyhfRb3Xf/Tn2TZ7ld73A1TXDWEvqeQUAgs8VOnPOf0Pdn lpl9oCf19q/ZiT2bwoW2jCarGsmdB2ZhDsYMYGVwFDYAbLDwG8rp+mLZQY/o0KLVuQko tcanL0ipA+j91y9STm0xRH1VHaT4vad38VWWNTTbBziCH+l7xpiXcnUhT6CdjH98rqy6 LK/2apmt6OgM+VaLSBsdx3E9OUdbNNFXlKTJpl+NsIfekPotr9mHihIV+b5od0NmwyzW QiOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bigon.be header.s=key1 header.b=lhsZRaNy; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si6083678ede.196.2019.10.11.05.25.06; Fri, 11 Oct 2019 05:25:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bigon.be header.s=key1 header.b=lhsZRaNy; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbfJKMYW (ORCPT + 11 others); Fri, 11 Oct 2019 08:24:22 -0400 Received: from ithil.bigon.be ([163.172.57.153]:38284 "EHLO ithil.bigon.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728092AbfJKMYV (ORCPT ); Fri, 11 Oct 2019 08:24:21 -0400 Received: from localhost (localhost [IPv6:::1]) by ithil.bigon.be (Postfix) with ESMTP id 5F0C920549 for ; Fri, 11 Oct 2019 14:24:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bigon.be; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=key1; t=1570796658; x=1572611059; bh=m4SawSp2MoaNmkzZ4QJxYFCZBUoBrxvwqNsJDEZ32zM=; b=lhsZRaNySwZR lkXTfF22OQl7BQBCttEYluMg2TqjpmGRx3sR92ryzAxz6Eej+QOWSDUVqaPH6669 UDt7PJH6zm6CUuk+o0x4XZSEnNJPErOgLVP3nr/9KjJgXizSzcXkWtpMGKkMIOUj VSPspbH6iCCT1fPAvdPInLtN1SU55s0= Received: from ithil.bigon.be ([IPv6:::1]) by localhost (ithil.bigon.be [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id uQwzTy3ptjRE for ; Fri, 11 Oct 2019 14:24:18 +0200 (CEST) Received: from edoras.bigon.be (unknown [193.53.238.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bigon@bigon.be) by ithil.bigon.be (Postfix) with ESMTPSA for ; Fri, 11 Oct 2019 14:24:18 +0200 (CEST) Received: from bigon (uid 1000) (envelope-from bigon@bigon.be) id 22053 by edoras.bigon.be (DragonFly Mail Agent v0.12); Fri, 11 Oct 2019 14:24:16 +0200 From: Laurent Bigonville To: selinux-refpolicy@vger.kernel.org Subject: [PATCH 08/10] Allow colord_t to read snmpd_var_lib_t files Date: Fri, 11 Oct 2019 14:24:14 +0200 Message-Id: <20191011122416.14651-8-bigon@debian.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191011122416.14651-1-bigon@debian.org> References: <20191011122416.14651-1-bigon@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org From: Laurent Bigonville colord-sane daemon indirectly links against libsnmp, the library tries to read files in /var/lib/snmp ---- type=AVC msg=audit(06/10/19 12:58:49.639:83) : avc: denied { getattr } for pid=873 comm=colord-sane path=/var/lib/snmp dev="dm-1" ino=399773 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=1 ---- type=AVC msg=audit(06/10/19 12:58:49.639:84) : avc: denied { search } for pid=873 comm=colord-sane name=snmp dev="dm-1" ino=399773 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=1 ---- type=AVC msg=audit(06/10/19 12:58:49.647:85) : avc: denied { search } for pid=873 comm=colord-sane name=snmp dev="dm-1" ino=399773 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=1 ---- type=AVC msg=audit(06/10/19 12:58:49.647:86) : avc: denied { getattr } for pid=873 comm=colord-sane path=/var/lib/snmp dev="dm-1" ino=399773 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=1 Signed-off-by: Laurent Bigonville --- policy/modules/services/colord.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/policy/modules/services/colord.te b/policy/modules/services/colord.te index 2fbb1835..ec03244b 100644 --- a/policy/modules/services/colord.te +++ b/policy/modules/services/colord.te @@ -132,6 +132,10 @@ optional_policy(` policykit_read_reload(colord_t) ') +optional_policy(` + snmp_read_snmp_var_lib_files(colord_t) +') + optional_policy(` sysnet_exec_ifconfig(colord_t) ') -- 2.23.0