Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs8tx-00568h-9Z for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Apr 2024 22:16:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rs8tw-009k3L-8Z for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Apr 2024 22:16:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs8tv-009k3D-VU for pgsql-hackers@lists.postgresql.org; Wed, 03 Apr 2024 22:16:11 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs8tq-000Qfp-Ou for pgsql-hackers@postgresql.org; Wed, 03 Apr 2024 22:16:10 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 367A35C008C; Wed, 3 Apr 2024 18:16:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 03 Apr 2024 18:16:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1712182565; x=1712268965; bh=+z2/L9K4FfRjsNoNIuh+11F+joUG3Y5y2nBL2Abr4mQ=; b= JhNrvS4cB5sdjgBsKNV7nEqHNArZ06WDa50ln1hxc7qR1uVp6ecE7wGBfqkKESy5 PpnJil5dp/Qnm48R5pXxQTiVAAwTsZyAtM1N8s/sW6UIKmyMMTvIu1iackpxkSCf tuR8sfio+JlGnRGzeBZcwflfMsxVDcSKCtR0MRhhf9qwaCl/FCrXdSL2qZ7lMAjB hVtLz0hLqnkQL7aqrILw0ndRoHZFR+yaP4D3Gq31dJjZ2mPMVJaURu54kE6pwZbL utt84kL65xtsjnrRMApoqJ2kldNSJs28u4b52So1E9+t2KQxq4EaJdfF+GcTL53h x5MSvG4ai8YchU8HBouZgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712182565; x= 1712268965; bh=+z2/L9K4FfRjsNoNIuh+11F+joUG3Y5y2nBL2Abr4mQ=; b=T WlncTlCqigGAvWVMw69crM0S/9HUYJRgEkT9pYQfIU/e/QtOChSwiBLaxar5CoJ4 O9Xpd+Xt6vW3QZcjfdQ90+WqcDRDFWVHp/eLCsXwUbca+bKuvSoHdY0f7vt/icrb hy3xHCsE8AxN3UMUOw2tuxqx580kBTHmoikPZG11TQVPYkE4urhcHEG5csCbOwcW tdyBXImq7T5r4aozgUU2ACJQTUtBDaWDPSEuSanRig6hsN+vT9Ts/5xoSfI8fGcu bnj/RuMbSgLkCjaSFcE6B96ltH89tKBuBUFgycmFnZ2snVsPMaB95VK5uLXmXTrh MwU4qryTbhkQQaorl2GZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefjedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpefhieetgfelveettdffjeevudejkeejudfgtdevffejledvtdefkeeg gfejhffggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Apr 2024 18:16:04 -0400 (EDT) Date: Wed, 3 Apr 2024 15:16:03 -0700 From: Andres Freund To: Tom Lane Cc: Magnus Hagander , Bruce Momjian , PostgreSQL-development Subject: Re: Security lessons from liblzma - libsystemd Message-ID: <20240403221603.56nfpjfh6bqp45vw@awork3.anarazel.de> References: <20240403175721.l4r55sw4vcsrgpww@awork3.anarazel.de> <385938.1712181535@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <385938.1712181535@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-04-03 17:58:55 -0400, Tom Lane wrote: > Magnus Hagander writes: > > On Wed, Apr 3, 2024 at 7:57 PM Andres Freund wrote: > >> Openssh has now integrated [1] a patch to remove the dependency on > >> libsystemd > >> for triggering service manager readyness notifications, by inlining the > >> necessary function. That's not hard, the protocol is pretty simple. > >> I suspect we should do the same. We're not even close to being a target as > >> attractive as openssh, but still, it seems unnecessary. > > > +1. > > I didn't read the patch, but if it's short and stable enough then this > seems like a good idea. It's basically just checking for an env var, opening the unix socket indicated by that, writing a string to it and closing the socket again. > (If openssh and we are using such a patch, that will probably be a big > enough stake in the ground to prevent somebody deciding to change the > protocol ...) One version of the openssh patch to remove liblzma was submitted by one of the core systemd devs, so I think they agree that it's a stable API. The current protocol supports adding more information by adding attributes, so it should be extensible enough anyway. > >> An argument could be made to instead just remove support, but I think it's > >> quite valuable to have intra service dependencies that can rely on the > >> server actually having started up. > > > If we remove support we're basically just asking most of our linux > > packagers to add it back in, and they will add it back in the same way we > > did it. I think we do everybody a disservice if we do that. It's useful > > functionality. > > Yeah, that idea seems particularly silly in view of the desire > expressed earlier in this thread to reduce the number of patches > carried by packagers. People packaging for systemd-using distros > will not consider that this functionality is optional. Yep. Greetings, Andres Freund