Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp440981pxb; Thu, 17 Feb 2022 07:20:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYi63IDJTaMYCy61DWPPww3ezMWEmqdkyAWqoXRDLBYces12erKHUCBIywBG35N9sz/LdI X-Received: by 2002:a05:6402:2747:b0:40e:fef7:2e41 with SMTP id z7-20020a056402274700b0040efef72e41mr3053135edd.207.1645111223935; Thu, 17 Feb 2022 07:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645111223; cv=none; d=google.com; s=arc-20160816; b=VOUq/1dYFSjH/0OoUQ7TGSe4FXuKxPobRifWBv7+rn8mDqubtpzDFm5VPvUwsSwAPP fKYcmVKbLiZTAr5yz+VE7MILevuV2R7nRzDYmrARGKPFJbLBY0KUxaglnP9Vo3rcPQ4h hPLwZNHgeUQvqBtD3HJjl5NIM6MdjwNtEvxLLa+REHN1chb2nQhusNNQqWPk9pzPeFFe fHtpV8jwx767xcq1up4B2L7XfMDR1P+m0GGmhr53do1eJhhtDd6HdkhHCpuEN6iS5EzK Nm5yEN58iQUpqHRmMD+KdIclxYT/iLGEPFm7rUEUL/KMHkyuJl7eIPkbOz3woqXdkuNg RmaQ== 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; bh=Jn5mIoqvExSxHpGcAaEKXFWN+O368nGl6YNlN5oWcYM=; b=KRdodsX9+NZsisuPYwsH6W8D5Rzn+/i3SGMRm2OOJIQ1webNh5uIc+F/qiisyR2u17 VqLJmQgOH3ShjlcGIG7trZbR40A4S0jq588mjO39x6hXTxWsSLtmwFLjm2XFV7w03KrM CeSXMWuszRxZDoa1HaW9hcTGNcHCAh4qH84qMVzY1gxD1Neb5VjlO9kkAGV/z0p9duvD ApkxCKUkqPxCumQC9yly7soFE6Z8rBCxP3aYlRl5+/ne87ofeWC6pxo76ygN+DGdRmXH YgbWGrIQz14Jlp0H2iKkwouqhLEU5zVdVx4BKlfqNXgq894re1FnqHRJb2bcSTpUFtWt Qbog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=O5D6FHUx; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ieee.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs7si4138093edb.192.2022.02.17.07.20.15; Thu, 17 Feb 2022 07:20:23 -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=@ieee.org header.s=google header.b=O5D6FHUx; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237180AbiBQNtF (ORCPT + 22 others); Thu, 17 Feb 2022 08:49:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbiBQNtC (ORCPT ); Thu, 17 Feb 2022 08:49:02 -0500 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A70C7C33 for ; Thu, 17 Feb 2022 05:48:46 -0800 (PST) Received: by mail-qv1-xf31.google.com with SMTP id a19so8275876qvm.4 for ; Thu, 17 Feb 2022 05:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=Jn5mIoqvExSxHpGcAaEKXFWN+O368nGl6YNlN5oWcYM=; b=O5D6FHUxvNcBbAD9oyRH+iwVcVgvaqGO7v0B+Xo6naUoUGrlbC/Tq2S3/IfwiEJb42 ZjjjKmS1zvsPYQ9DDajHRKnCHCdoVtD3e073EYzAjOqBoWhvp7AiEX1s1fQo/4Oc3jT6 H2n+tT3Bjzthb00Pcl8Pcp+tK1RReC/KSP/2U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Jn5mIoqvExSxHpGcAaEKXFWN+O368nGl6YNlN5oWcYM=; b=TYNvL1ErvkmwbRBCtUOgqGyTwnyaO7z6o/Am0as+NveieYTWLq2mk/j397u3JIK1r6 YR4dgUsr8VNHEmePzv+fSV0x+/BzRkYKU6uvporODEUdrnL1majnSo2bpWsL4lh3pt1x tcaF2FymTtHQJ8h4rrGnnQHGHOy6RHj4dmWv0LTZWgUCYVElOQy7Kn4qHT4WvNRtvr4S pPpn/fKPQb6r8SyDInllieTddk7WEaRU51ykg2X/c/SuUiR+63ctV7PeubVOigjUUATd M5fMK4IgNJ/d4xhdbrEOc8K1Vuaf+hqeNfC6DPUKdatxfYiPI/zaPGmFPUzo92Yym42c RZWg== X-Gm-Message-State: AOAM530fX43xczczdLI4jTFNRaNsVr0CN9YXbG63fEZ6aIIDDspqIfWu 2mp/SKwGanr+KYMoGRPhDN3tJSb7Irpvig== X-Received: by 2002:ac8:7f88:0:b0:2d4:be34:a302 with SMTP id z8-20020ac87f88000000b002d4be34a302mr2339271qtj.263.1645105725566; Thu, 17 Feb 2022 05:48:45 -0800 (PST) Received: from [192.168.1.126] ([72.85.44.115]) by smtp.gmail.com with ESMTPSA id x83sm1093070qkb.68.2022.02.17.05.48.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Feb 2022 05:48:44 -0800 (PST) Message-ID: Date: Thu, 17 Feb 2022 08:48:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] new sddm pam patch 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=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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/17/22 01:53, Russell Coker wrote: > Here is a new patch for sddm using PAM for it's own helper. This one > uses system_r instead of xdm_r and has patches for all 3 versions of the > policy config. I think it's ready for inclusion. > > Signed-off-by: Russell Coker > > Index: refpolicy-2.20220217/policy/modules/services/xserver.te > =================================================================== > --- refpolicy-2.20220217.orig/policy/modules/services/xserver.te > +++ refpolicy-2.20220217/policy/modules/services/xserver.te > @@ -843,6 +843,9 @@ manage_files_pattern(xserver_t, xdm_tmp_ > manage_lnk_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) > manage_sock_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) > > +# for sddm to use pam for greeter, sddm greeter needs execmod > +allow xdm_t xdm_tmpfs_t:file execmod; > + > # Run Xorg.wrap > can_exec(xserver_t, xserver_exec_t) > > Index: refpolicy-2.20220217/config/appconfig-mcs/seusers > =================================================================== > --- refpolicy-2.20220217.orig/config/appconfig-mcs/seusers > +++ refpolicy-2.20220217/config/appconfig-mcs/seusers > @@ -1,2 +1,3 @@ > root:unconfined_u:s0-mcs_systemhigh > __default__:unconfined_u:s0-mcs_systemhigh > +sddm:xdm:s0 Did sddm:system_u fail? If we must have a new seuser, please place it in the xserver module. The build system supports declaring users in modules. The changes for seusers changes for standard and mls are missing. > Index: refpolicy-2.20220217/policy/users > =================================================================== > --- refpolicy-2.20220217.orig/policy/users > +++ refpolicy-2.20220217/policy/users > @@ -27,6 +27,7 @@ gen_user(system_u,, system_r, s0, s0 - m > gen_user(user_u, user, user_r, s0, s0) > gen_user(staff_u, staff, staff_r sysadm_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats) > gen_user(sysadm_u, sysadm, sysadm_r, s0, s0 - mls_systemhigh, mcs_allcats) > +gen_user(xdm, user, system_r, s0, s0) > > # Until order dependence is fixed for users: > ifdef(`direct_sysadm_daemon',` > Index: refpolicy-2.20220217/config/appconfig-mcs/xdm_default_contexts > =================================================================== > --- /dev/null > +++ refpolicy-2.20220217/config/appconfig-mcs/xdm_default_contexts > @@ -0,0 +1 @@ > +system_r:xdm_t:s0 system_r:xdm_t:s0 > Index: refpolicy-2.20220217/config/appconfig-mls/xdm_default_contexts > =================================================================== > --- /dev/null > +++ refpolicy-2.20220217/config/appconfig-mls/xdm_default_contexts > @@ -0,0 +1 @@ > +system_r:xdm_t:s0 system_r:xdm_t:s0 > Index: refpolicy-2.20220217/config/appconfig-standard/xdm_default_contexts > =================================================================== > --- /dev/null > +++ refpolicy-2.20220217/config/appconfig-standard/xdm_default_contexts > @@ -0,0 +1 @@ > +system_r:xdm_t system_r:xdm_t -- Chris PeBenito