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 ABCE7C433EF for ; Wed, 16 Feb 2022 13:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232803AbiBPNLh (ORCPT ); Wed, 16 Feb 2022 08:11:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232267AbiBPNLh (ORCPT ); Wed, 16 Feb 2022 08:11:37 -0500 Received: from smtp.sws.net.au (smtp.sws.net.au [IPv6:2a01:4f8:201:1e6::dada:cafe]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6DF62A64EE for ; Wed, 16 Feb 2022 05:11:22 -0800 (PST) Received: from xev.coker.com.au (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id 55457EDF9 for ; Thu, 17 Feb 2022 00:11:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1645017080; bh=Q2NyIqqllPrtPm5grpHjpWEp62wtUewvqUI4dOyJoOo=; l=1878; h=Date:From:To:Subject:From; b=bGp55ylkrNhH5kQK8qYSnj/2CSorLcDKu8Sdg3MCxHebNJ4cJmWW0StX0ccwkn0+0 LkJMk2QNsiIZ9hNoeXgxCBU6HgRAb/Lx7HWYwEMV/+DQQ8mZGXqsqycFyebtrU8gP7 egW1RbMaaTDs8In8cJR08iaPfkiRnKH/o0pea+B4= Received: by xev.coker.com.au (Postfix, from userid 1001) id D80B21730F48; Thu, 17 Feb 2022 00:11:15 +1100 (AEDT) Date: Thu, 17 Feb 2022 00:11:15 +1100 From: Russell Coker To: selinux-refpolicy@vger.kernel.org Subject: [PATCH] init dbus patch for GetDynamicUsers Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org 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(`