Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onaKx-0001v8-U7 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Oct 2022 06:56:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1onaKu-0008D4-Fu for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Oct 2022 06:56:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onaKt-0008Cu-1l for pgsql-hackers@lists.postgresql.org; Wed, 26 Oct 2022 06:56:24 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onaKl-0004os-Ki for pgsql-hackers@lists.postgresql.org; Wed, 26 Oct 2022 06:56:21 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 51D385C015E; Wed, 26 Oct 2022 02:56:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 26 Oct 2022 02:56:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1666767374; x=1666853774; bh=L+HbPsPhSr JRx6jlx+c/jGMoxqmHGyBVBl6Gfuz5Mgk=; b=X3TPBCUva6rdLpCmY28irCRewE u9q1I5fazaLTg0IVgyeKgaQFGD7qxHYP84Cf2fAaobD6HuMkEjBoTsVL2ScOjPYD 4LW7WtS9mLAGLYVs40C/QEoLP/i4uwsxDkoMqfs5WFT7OTgeoSSG3b3eq4XNF6c9 4+evN8UXB66cTDNwVw4Zz99ZV3ryg2hC15GYYKbvHDlUWdUgGgzqrTNmsufwOv3l 2WHTvnNlgTr8jP2v34oGFdoV69CXzIpup1rvzv1EXHdnaSjJoxZ6w0+IRNGx4HhQ MuYgehYj7PdWEluIwU7N579Aw7G2DgwV/J5SmHqHJ8HpudSQEthhWtvNg/MA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1666767374; x=1666853774; bh=L+HbPsPhSrJRx6jlx+c/jGMoxqmH GyBVBl6Gfuz5Mgk=; b=d/GcZhce0Ww8VkTvsm+e7WnaD38fLph68l8/l02MO1dt BWG2BZuxjZHy5uUsq9u76Nm/bEWMm6Chw6YXiP6vWmUd0ShsPiCz1v6FrWbqBNZr P8EZJ8OKDWvLVMLAEbOcssMyMYvn11NHJCvIZaMOraMNJip6+gY+R5qK8OB5QKMI fxeBZX1PDdQ1nPh0XVUzsTMoGSceD5kiOFuyere2EZC1x4tUCQwVHoASeb4ybdl+ AfCuLFrqo5Dcsa4YIrjQc5zI1TL4DBZLiuiqdzrmmpqoc7PG+gYzO9d8nnJi6Lq8 +6K0BTbiXdXrOfYNZZQZd4sti2aCf5CAedjgAxc/Tg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtddugdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Oct 2022 02:56:12 -0400 (EDT) Date: Wed, 26 Oct 2022 15:56:07 +0900 From: Michael Paquier To: Julien Rouhaud Cc: PostgreSQL Hackers , Nathan Bossart Subject: Re: Allow file inclusion in pg_hba and pg_ident files Message-ID: References: <20220816061030.3xw7emtuxf32qmuk@jrouhaud> <20220917170612.wnyii63gblsgzane@jrouhaud> <20221010025132.mmfytfs52l6rvggw@jrouhaud> <20221024053312.b52456zhzupduouw@jrouhaud> <20221024080303.otukfbx54rwaqznn@jrouhaud> <20221025070859.l6eza2ixqfoatodd@jrouhaud> <20221026031948.cbrnzgy5e7glsq2d@jrouhaud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3339UCLiae6dKnh4" Content-Disposition: inline In-Reply-To: <20221026031948.cbrnzgy5e7glsq2d@jrouhaud> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --3339UCLiae6dKnh4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 26, 2022 at 11:19:48AM +0800, Julien Rouhaud wrote: > That wouldn't be overdoing anymore if we remove the line number / filenam= e from > the fill_*_line prototypes right? So, I have spent a good portion of today looking at what you have here, applying 0001 and 0003 while fixing, rebasing and testing the whole, discarding 0002 (we could do more for the line number and source file in terms of the LOGs reported for a regexec failure).=20 Now remains 0004, which is the core of the proposal, and while it needs a rebase, I have not been able to spend much time looking at its internals. In order to help with the follow-up steps, I have spotted a few areas that could be done first: - The diffs in guc.h/c for the introduction of GetDirConfFiles() to get a set of files in a directory (got to think a bit more about ParseConfigFp() when it comes to the keywords, but that comes to play with the parsing logic which is different). - The TAP test, which is half the size of the patch in line number. Could it be possible to make it more edible, introducing a basic infrastructure to check a set of rules in pg_hba.conf and pg_ident.conf without the inclusion logic? Checks for error patterns (that I agree we strongly lack tests for) look like something we'd want to tackle independently of the inclusion logic, and it should be built on top of a basic test infra, at least. -- Michael --3339UCLiae6dKnh4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmNY2gcACgkQnvQgOdby QH3lmxAAl1e2q+Hx+AtFuG/uFt6KbjOhT2br0ACKOstTcgcOERnjuHDignnSsgn5 Jq1OZbt27U8NU+ZbzqnTD16KjlvITuAHGgkOlYP13hHDCqoZXmls2JTWmNEIe7zr s+0Ynya8fpjHgegIuanHfoRXlLJnJhrubWMIrOAZOmb3+Kyb8Z/X2dB3oY7XwOtA fLa2wi8Y2QTJxFMQ4f6bbyV4QxyLGfmHBx2fmrSoB0wNzNZHVZ1uKDqhmsN7Ouz3 5ukx2JSK19z2bmI2ReUbDp/unOWdI0vK3M3lkWIVc1RoqzTvruuXyMYVzxL6V6mS xCZjtgxGABKRGGnSO4Aeawy5fnttb44NLyXHFDtsDGnazQ4s+l1/7KsHqUsvzHvW jxLGqEFPfbKjjgUokZzNSKGJUQPfS6vOOFg3Ol6bEEqx60aRv26nhBhPBxgM2fp2 n+vGJEZoU0K0JG/rbxxmXELUUa2MeTAiaFt2I/hzYbbvsIIvwAvhqkankwmoDzI8 IAphD5DbDnuUawJQQVN5molc/h9CYhQQ+G6O0dQ+PtJ2LDhvYXwj/sgjh/bOuioh MZssFy90yDjL7RNCXHII/9XUZXh4kcnKYnf2RmU3yRbKKBBKTkloyvkpGttw6Bty rT9QZqXMsb1il0Kh5cWqc7284K94b+vBhFYvHTYrX1n1VP7qC8M= =nCtj -----END PGP SIGNATURE----- --3339UCLiae6dKnh4--