From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4EFC3158094 for ; Sat, 3 Sep 2022 19:10:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5EFCCE07A9; Sat, 3 Sep 2022 19:10:18 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 451CDE07A9 for ; Sat, 3 Sep 2022 19:10:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5ABD8340F8E for ; Sat, 3 Sep 2022 19:10:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E7F75A4 for ; Sat, 3 Sep 2022 19:10:15 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1662230515.9f377595365a60a9d630534e322aa928a4f9c3ea.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/sysnetwork.if policy/modules/system/systemd.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 9f377595365a60a9d630534e322aa928a4f9c3ea X-VCS-Branch: master Date: Sat, 3 Sep 2022 19:10:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f733c34-2ee8-4bd6-9253-dd1d3f2b93e0 X-Archives-Hash: dee8cd742821559464fa0540a6462e7a commit: 9f377595365a60a9d630534e322aa928a4f9c3ea Author: Kenton Groombridge concord sh> AuthorDate: Wed Apr 27 05:09:52 2022 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Sep 3 18:41:55 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=9f377595 sysnetwork, systemd: allow DNS resolution over io.systemd.Resolve Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Jason Zaman gentoo.org> policy/modules/system/sysnetwork.if | 1 + policy/modules/system/systemd.if | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/policy/modules/system/sysnetwork.if b/policy/modules/system/sysnetwork.if index ad8428f5..464893f6 100644 --- a/policy/modules/system/sysnetwork.if +++ b/policy/modules/system/sysnetwork.if @@ -900,6 +900,7 @@ interface(`sysnet_dns_name_resolve',` ifdef(`init_systemd',` optional_policy(` systemd_dbus_chat_resolved($1) + systemd_stream_connect_resolved($1) ') # This seems needed when the mymachines NSS module is used optional_policy(` diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if index cab51732..cc942879 100644 --- a/policy/modules/system/systemd.if +++ b/policy/modules/system/systemd.if @@ -2319,6 +2319,27 @@ interface(`systemd_tmpfilesd_managed',` ') ') +####################################### +## +## Connect to systemd resolved over +## /run/systemd/resolve/io.systemd.Resolve . +## +## +## +## Domain allowed access. +## +## +# +interface(`systemd_stream_connect_resolved',` + gen_require(` + type systemd_resolved_t; + type systemd_resolved_runtime_t; + ') + + files_search_runtime($1) + stream_connect_pattern($1, systemd_resolved_runtime_t, systemd_resolved_runtime_t, systemd_resolved_t) +') + ######################################## ## ## Send and receive messages from