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 X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15E07C43331 for ; Sat, 7 Sep 2019 20:59:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDCAA2178F for ; Sat, 7 Sep 2019 20:59:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="OAGN6GBA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406277AbfIGU7J (ORCPT ); Sat, 7 Sep 2019 16:59:09 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:36227 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406227AbfIGU7J (ORCPT ); Sat, 7 Sep 2019 16:59:09 -0400 Received: by mail-qk1-f193.google.com with SMTP id s18so9172196qkj.3 for ; Sat, 07 Sep 2019 13:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=t9fkS9HoHcMewxUP14lEpziOHwuun1kpZ7A1TRju+fY=; b=OAGN6GBAB8dEGBZlBrGvXxMYfACGi+G0cr/Tx9Eoxcky0jNaEQbTqTcUVLjjUezCM7 sOst/Bg4QPxopXzjKGIG8cEUwxRewW3i5PDl8W3o27eaqkh+aDCWkI5Slm1eP0fIkXRr oEAIQqMauWOadpIqKcV4BcIcy4rDktcJdVen8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t9fkS9HoHcMewxUP14lEpziOHwuun1kpZ7A1TRju+fY=; b=c+hqeuclOpYuhykurzTv7k4Nq3GhrR3JDLiXV98LONu7J5pXlcJlzbuG6j26IYtFi/ E3s3Vr/EDsPYhGNAkShmBIaHXe1CEqF7NQBvPy/1wjzaSCnxUYLNCNVCDvCWGV3KBVRP jIiS5iPzcGexQDFbUh/HdudTEYQ64OTOwytCT+JynsCUpQUh/H+cgjAzjlmJP/VqyRTP tPdexBaFvHecgFImncWRV4SRwdmnZti5QXQocW7deDTKLJ9Bm3PHKOK5W5p1EFrEubCR K7ypmVT09E/c/N5krnx4zuc6IEn+adAvbuP5NC+jeYrQDaORYX0aJPp7x+bJ3Cn/jVmc jSBA== X-Gm-Message-State: APjAAAU5uZDC+/tpRnLyDa1Q3U4BrhpysyVMmMaIlL64PNSXG8hDXdTm +RQONmk/5VTX0vr20IhSXx6qiOjt3gM= X-Google-Smtp-Source: APXvYqxhpHbhjL50oGWQYhl86IGUME+TI9pUrWbJPGjFH9FPI5vIZgGQyWmmwUKsovoYpUL3YUKAkQ== X-Received: by 2002:a37:4a54:: with SMTP id x81mr15891290qka.292.1567889948041; Sat, 07 Sep 2019 13:59:08 -0700 (PDT) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id 139sm4505225qkf.14.2019.09.07.13.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Sep 2019 13:59:07 -0700 (PDT) Subject: Re: [PATCH] Remove shell automatic domain transitions to unconfined_t from various pam login programs To: Dominick Grift , selinux-refpolicy@vger.kernel.org References: <20190901124620.375409-1-dac.override@gmail.com> From: Chris PeBenito Message-ID: Date: Sat, 7 Sep 2019 16:27:26 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190901124620.375409-1-dac.override@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 9/1/19 8:46 AM, Dominick Grift wrote: > I think these may have been adopted from the old Red Hat targeted policy (that model only had unconfined users) > > Some aspect to note: > > 1. The ssh_sysadm_login boolean now applies to unconfined_t as well > 2. remotelogin only allows unpriv logins > > The rshd module also calls unconfined_shell_domtrans() but I ignored that one because that policy currently does not have support for manual transitions with pam_selinux. > > Signed-off-by: Dominick Grift > --- > policy/modules/services/remotelogin.te | 4 ---- > policy/modules/services/ssh.te | 4 ---- > policy/modules/system/locallogin.te | 4 ---- > 3 files changed, 12 deletions(-) Merged. > diff --git a/policy/modules/services/remotelogin.te b/policy/modules/services/remotelogin.te > index bc2292e3..c7c9c564 100644 > --- a/policy/modules/services/remotelogin.te > +++ b/policy/modules/services/remotelogin.te > @@ -91,10 +91,6 @@ optional_policy(` > telnet_use_ptys(remote_login_t) > ') > > -optional_policy(` > - unconfined_shell_domtrans(remote_login_t) > -') > - > optional_policy(` > usermanage_read_crack_db(remote_login_t) > ') > diff --git a/policy/modules/services/ssh.te b/policy/modules/services/ssh.te > index 4e75b6e1..a99ad912 100644 > --- a/policy/modules/services/ssh.te > +++ b/policy/modules/services/ssh.te > @@ -328,10 +328,6 @@ optional_policy(` > systemd_dbus_chat_logind(sshd_t) > ') > > -optional_policy(` > - unconfined_shell_domtrans(sshd_t) > -') > - > optional_policy(` > xserver_domtrans_xauth(sshd_t) > xserver_link_xdm_keys(sshd_t) > diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te > index a56f3d1f..632d2542 100644 > --- a/policy/modules/system/locallogin.te > +++ b/policy/modules/system/locallogin.te > @@ -200,10 +200,6 @@ optional_policy(` > systemd_write_inherited_logind_sessions_pipes(local_login_t) > ') > > -optional_policy(` > - unconfined_shell_domtrans(local_login_t) > -') > - > optional_policy(` > usermanage_read_crack_db(local_login_t) > ') > -- Chris PeBenito