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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35EF7C433F5 for ; Wed, 16 Feb 2022 15:46:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234760AbiBPPrA (ORCPT ); Wed, 16 Feb 2022 10:47:00 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233486AbiBPPq7 (ORCPT ); Wed, 16 Feb 2022 10:46:59 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDFF214CDA9 for ; Wed, 16 Feb 2022 07:46:46 -0800 (PST) Received: from [192.168.254.13] (unknown [72.85.44.115]) by linux.microsoft.com (Postfix) with ESMTPSA id 24D8820BBF90; Wed, 16 Feb 2022 07:46:45 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 24D8820BBF90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1645026406; bh=Ii3ouicDoYvxIthyM3rJkXKqwMGaC52crY4qciOeyJ4=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Wh+YmM+QSLMzmwKqixRNwwJf0VBPrEMIIk8c49f5/KHBwjSh0ciNGgScPyRd3oTbU g6O5jY4kDCJDg6oBcguKrp2LpLqM9veUVrDokgukpKpDuNhPcVszL9aEMNF+FLO0Ai boj8Oe9ZVPhQxNAcr0hPlPOqPAUKCR5u5qTN9FEQ= Message-ID: <6947f06f-6a39-e6da-eac3-68e06ebb2ec4@linux.microsoft.com> Date: Wed, 16 Feb 2022 10:46:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH] init dbus patch for GetDynamicUsers Content-Language: en-US To: Russell Coker , selinux-refpolicy@vger.kernel.org References: From: Chris PeBenito In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 2/16/2022 08:11, Russell Coker wrote: > Small patches for dbus access to talk to init for getting dynamic users > with systemd. The daemons do such checks from library code. > > Signed-off-by: Russell Coker > > Index: refpolicy-2.20220216/policy/modules/services/dictd.te > =================================================================== > --- refpolicy-2.20220216.orig/policy/modules/services/dictd.te > +++ refpolicy-2.20220216/policy/modules/services/dictd.te > @@ -79,3 +79,6 @@ optional_policy(` > seutil_sigchld_newrole(dictd_t) > ') > > +ifdef(`init_systemd',` > + init_dbus_chat(dictd_t) > +') > Index: refpolicy-2.20220216/policy/modules/services/postfix.te > =================================================================== > --- refpolicy-2.20220216.orig/policy/modules/services/postfix.te > +++ refpolicy-2.20220216/policy/modules/services/postfix.te > @@ -376,9 +376,6 @@ manage_lnk_files_pattern(postfix_bounce_ > > optional_policy(` > init_dbus_chat(postfix_bounce_t) > -') > - > -optional_policy(` > dbus_system_bus_client(postfix_bounce_t) > ') > > @@ -754,6 +751,11 @@ optional_policy(` > unconfined_run_to(postfix_showq_t, postfix_showq_exec_t) > ') > > +ifdef(`init_systemd',` > + init_dbus_chat(postfix_showq_t) > + dbus_system_bus_client(postfix_showq_t) > +') > + > ######################################## > # > # Smtp delivery local policy > @@ -778,6 +780,12 @@ optional_policy(` > ') > > optional_policy(` > + dbus_send_system_bus(postfix_smtp_t) > + dbus_system_bus_client(postfix_smtp_t) > + init_dbus_chat(postfix_smtp_t) > +') > + > +optional_policy(` > dovecot_stream_connect(postfix_smtp_t) > ') > > @@ -815,9 +823,8 @@ optional_policy(` > ') > > optional_policy(` > - dbus_send_system_bus(postfix_smtp_t) > - dbus_system_bus_client(postfix_smtp_t) > - init_dbus_chat(postfix_smtp_t) > + dbus_system_bus_client(postfix_smtpd_t) > + init_dbus_chat(postfix_smtpd_t) > ') > > optional_policy(` Please use systemd_use_nss() instead of the individual dbus and init rules. -- Chris PeBenito