Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp981267pxb; Wed, 16 Feb 2022 08:23:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyN/sHINiGrhheU+PcX8Hqmc0drgF6fXtr4tJYlkw2O5SdztC+r4z2v5ocUVIgIMI9Jv/sb X-Received: by 2002:a17:906:d10c:b0:6cd:4aa2:cd62 with SMTP id b12-20020a170906d10c00b006cd4aa2cd62mr2920732ejz.229.1645028580099; Wed, 16 Feb 2022 08:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645028580; cv=none; d=google.com; s=arc-20160816; b=pqiPj5yHNnBh9e2yxkfz+DEn0kLmBdJ4ZzRBVaVCOH/8Gb7WX367seHTpGEuBmxqJd mwkQ1QezE31bhQbFelQGEK/Qfyj+j680wZcMwYP98coVC1zeOLayiRFycXtWeoORpkUB Wtfc1BEBG2JwwtjLNyQ/7+ilj7Q3rRbq9XX/w+JsX8xvHhsdr6NFvZTV211gVA0tku3D LQEselX2vsZmspnO2BZIc3NdE6mGnCpbU3NDSgpuy0VA4hcdK9l7pRDqPjA/WGJeR8oU uN5gxcY4sCMqG0PHc2etTsRCqKZTwairh6MlOFetBJgngLq4khkt01OvQJSVW2ytZ3FU /wTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature:dkim-filter; bh=Ii3ouicDoYvxIthyM3rJkXKqwMGaC52crY4qciOeyJ4=; b=IfG1W7iErDdcdm0qCcW3ISOqmWhTo0xDEECXyAQWtlUPYNE3pMYi8TtD7uXT8PTfMz vLlRqwEd7EN320OigYpnyqZTxQjXNGty0BovzC822BH/f53r8i6OR1JYuernkRe7G2Tf Nl4V+L0K5hbgzXeP4yZ9twiVSxrGoVqrfwNKoWToUJt0kCbmNcnZR2uCCafIVV85Cbwl mZEeYyj2F38rdGfH9AxjVjhNRVHGDVIQsniHiO1fgsErL4v3Vf45x7/1VzMu7x3DIUCb sErLFKNlNQGXA2IhMl2FmPI9wtgQcf/sd30KMNhY+wMrljOiZerQlj2XD3FhqYJEicRJ J87g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Wh+YmM+Q; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh44si141232ejc.291.2022.02.16.08.22.52; Wed, 16 Feb 2022 08:23:00 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Wh+YmM+Q; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234760AbiBPPrA (ORCPT + 22 others); 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 X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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