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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 1F764C43387 for ; Sun, 23 Dec 2018 10:20:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC04721849 for ; Sun, 23 Dec 2018 10:20:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q8MZuJFF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725895AbeLWKUF (ORCPT ); Sun, 23 Dec 2018 05:20:05 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:37050 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbeLWKUF (ORCPT ); Sun, 23 Dec 2018 05:20:05 -0500 Received: by mail-ed1-f65.google.com with SMTP id h15so8164678edb.4 for ; Sun, 23 Dec 2018 02:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DLMa4tvG1Zd/aP8mhmk5ask/jTNfbSNrHTleSXiDPNQ=; b=Q8MZuJFFTR5HgJqRf5dmXZl2O/NUqGxxA/AWP3lEgOpLYHQy95WMMfiAPxEH9ah9lg IiCLvA2TzjOUrV0QR9dHbXR09OTmYuzqirVzXtaTcfcOEgvsV40QW8KtZDSgplGFIIBK BkGTvPMR/1Aj+E6+dR5GZjM2UWNVKGAthcqdWg3tFLDVESjpxZi5UhQ8Q1cRgrzqF+Ze gYmI9ImOf7L3m75cyRS+krDcBdPdAcmxLhVyvXKoPk855JOH6SMPygE0/shzh49HW59E ZMvkIRuyb/wYIlf4GTLkUxJWu56V/Zstx/cKdcPg66iAwARPBYplzyizyhmiYnyy5AW5 1HcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=DLMa4tvG1Zd/aP8mhmk5ask/jTNfbSNrHTleSXiDPNQ=; b=Bkc+HBkhixToOXyJgDsbM2QQruNAWd9dgSO4PfyHirHeAxuVAHqvm8WvOl7OKnhSei Cg8i3MmLguSdgKt6rlKV+xVvSYW8miE1EqKHopS31EDBGd9w5WesRwhiohgGu07toI3d 7VQvkV+Xx0nYOpgKJfJ8FAS7rLkbzlc+EE/dW8AZIMAhnycYUkpzM70ap5d2bZ32jJU4 UaT+vApWHM7vPukf03X8MzxiUQGcEuc8KDAaaA43s75R4bkPEc5KWbIpc3u5bg9QMDFa mxcvOK1PuuIoHfFoY00oTXeYqLzOigAU/AULHmq1aIAzeybiqLQJDWLOfZUpokZ334oW mThg== X-Gm-Message-State: AA+aEWbH5JuPfRFyfFXHQs7573xUxqGSSKNS4UV9xUu1tHv6Xo5U1lhg Ej7XpQuqyznWEsKfbCDbMNcFkXnZ X-Google-Smtp-Source: AFSGD/WYFJyXzXbCu1u/fop8vPAYEewL9PjIO8VAp17zhGfSTXxFlyl/KnQY/zFOUpIyHNh08g9vpw== X-Received: by 2002:a50:88a4:: with SMTP id d33mr7434813edd.261.1545560402971; Sun, 23 Dec 2018 02:20:02 -0800 (PST) Received: from brutus.lan ([2001:985:d55d::438]) by smtp.gmail.com with ESMTPSA id j23-v6sm859697ejc.33.2018.12.23.02.20.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Dec 2018 02:20:01 -0800 (PST) Date: Sun, 23 Dec 2018 11:20:00 +0100 From: Dominick Grift To: "Sugar, David" Cc: "selinux-refpolicy@vger.kernel.org" Subject: Re: [PATCH 2/2] pam_faillock creates files in /run/faillock Message-ID: <20181223102000.GA20992@brutus.lan> Mail-Followup-To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20181221014026.2867-1-dsugar@tresys.com> <20181221014026.2867-2-dsugar@tresys.com> <20181221103416.GA4520@brutus.lan> <2d2d6c7f-3084-d6f6-ce1b-42c9d9535969@tresys.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <2d2d6c7f-3084-d6f6-ce1b-42c9d9535969@tresys.com> User-Agent: Every email client sucks, this one just sucks less. X-PGP-Key: https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 22, 2018 at 02:58:41AM +0000, Sugar, David wrote: >=20 > On 12/21/18 5:34 AM, Dominick Grift wrote: > > On Fri, Dec 21, 2018 at 01:41:25AM +0000, David Sugar wrote: > >> These are changes needed when pam_fallock created files in /run/faillo= ck > >> (which is labeled faillog_t). sudo and xdm (and probably other domain= s) > >> will create files in this directory for successful and failed logins > >> attempts. > > The pam stuff has become a bit broken in my view. > > > > We use to use auth_use_pam() for these kinds of things but the interfac= e was forgotten and not updated properly. > > > > So for example sudo does not even call auth_use_pam() and a lot of stuf= f was added directly to the login_pgm domain that should have been added to= auth_use_pam() instead. > > > > My opinion is that this belongs in auth_use_pam() >=20 > Dominick, >=20 > I see those interfaces.=A0 It looks like xdm_t already uses=20 > auth_login_pgm_domain(xdm_t).=A0 It also isn't really clear to me what th= e=20 > difference is between auth_login_pgm_domain() and auth_use_pam().=A0 I=20 > will make updates moving my change into auth_use_pam() and also update=20 > sudo_role_template() to use (I think) auth_login_pgm_domain (). sudo is not an auth_login_pgm_domain() i believe the auth_use_pam() is a subset of auth_login_pgm_domain() so login_pgm domains are pam clients plus extras needed to log in users a auth_use_pam() (pam client) has a pam stack but it might not actually do = logins sudo uses pam but its not a real login program, so afaik sudo should call a= uth_use_pam() xdm is a login_pgm, so is sshd etc systemd is also a pam client, but not a login program >=20 > I will resubmit this patch, >=20 > --- snip --- --=20 Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B02 Dominick Grift --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEujmXliIBLFTc2Y4AJXSOVTf5R2kFAlwfYUsACgkQJXSOVTf5 R2lQsAv+KdAKd6Oiz221tP3Z+z8KCYeOngM9MRENQHXnq3VcKuv6daPWOw7QnN8r qiFfyB6LeUdBvvPfUSgW2vPdFj0UPSjxKcHHFyQMgVsRxf+pJ9x780EiZZRuiPgZ NeNmIEvMbyiOARy2y/6QR2vKJknowPX3Q2gs86qKYk3tj0SHBBm+G/4TxmoomR+9 Q0zk1/5voKcYqpNycGhv743qN1URVKc+tvfQeVMt3//vUK+0jN7sH/fYXCueN7SI RhCoGRHB550XpDG70g4LhftYs12ONQyuoLNb2m4P3kKFhvB7PrONIVYzbvu8/yxY jvdIbpM7LZFv8et0ehep2xudAXqV+9T4TdtE61+Vf+5nVPSv2QV9NU3v7SHJCGhc u+Yq1LWISG8n7qUM08nIakhlQKRN9ML8oSOgN4i8ctNCYdL+kPnwERxNEp5j/Qvz dGM0nmDj1FQlT/Eab84KOcF/YXoLqo0BHImVYpoUmEsJ1jEUPOHhZ9jfun2RX/MF 1iGqNNRD =ihKq -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--