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 1oueiE-0005sX-3g for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Nov 2022 19:01:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oueiD-0005Qa-1A for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Nov 2022 19:01:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oueiC-00055u-DV for pgsql-hackers@lists.postgresql.org; Mon, 14 Nov 2022 19:01:40 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oueiA-0000kd-I2 for pgsql-hackers@postgresql.org; Mon, 14 Nov 2022 19:01:39 +0000 Received: by mail-pf1-x436.google.com with SMTP id g62so11882335pfb.10 for ; Mon, 14 Nov 2022 11:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timescale.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hlZKOQt60pJWHt2r5xRLhQL6BYLe6RwjlVDsnVC45FQ=; b=A6cljeHzrV+dzjIrrhpiJpVCFpQHmEaWMc0WpzFhbg9pLSUrzPc1Tkixp8MpELDVRi 880m97XLqejnsMJ27YjUru2iyaZ+fMEIWZB+JU6ZvK2hrdv7SyMWgshcEq464OCOUFS/ uG1ckLbCnKRoozEtjlvl/pgVnA+Zl3SsPNvE96OIb0Pz3wZo79/xL56BhqaR4ASqhsJM PV1oF8coqnoz2I0xvCdA1PwgJ/yiBpfGXHll4ryVHZQugfSfjngfhI9RxSBykz6R28DK akvWW0vFxVVq6v7vyI4Avp43Bty6tsDfPhM9Ds0/TBnicEvSNaRPO1wLExHQrx3nm8+Q PR9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hlZKOQt60pJWHt2r5xRLhQL6BYLe6RwjlVDsnVC45FQ=; b=04qNLztONbDyAYcBQ5HeF0hMRndsXhiPw0STCU9WZn3gdxk/wr7OO76XHhmFnxo9vw mJUg3fuSGwiaoy4RPqFcYzPerm6Q/9sheapzqM82Oqy6k88F1sR1x1ul+xWqd1y3+AYA YS0KG3lXjsxGUxxvh5y2VqhiZB/5muIZ9LPMj1GQWZC6t4/pEaQiA32qg9ioUwKbxl/+ qM+ZXwLZW32fsDKPsLZjVrqS++y/H0we0KdVB2djy40KGEr8bvkNhNjWOzJm5RCfmYA4 yx+dMazebDKo2MfWOIwFreUpQ0DO7/QEXT4XwNN1sRbJr0jlMS6+fY+j0mXbNbmtl93O aO+A== X-Gm-Message-State: ANoB5pld6hTr4AvNxwtOpz51fOyQVwBikHC8V/Z7p/tVsGnZFTYQDkmH k5wAuMAXsDzndMyAIZOPkOxICw== X-Google-Smtp-Source: AA0mqf7NTFCjz8cy/sdGuU8ukXfPAaa385DUhuMb/xj9vA/SDwxOh0Yuunkb3kFNScq/6rVJ6gAJjw== X-Received: by 2002:a63:656:0:b0:476:aad3:9122 with SMTP id 83-20020a630656000000b00476aad39122mr605127pgg.402.1668452496164; Mon, 14 Nov 2022 11:01:36 -0800 (PST) Received: from [192.168.1.21] ([50.53.8.205]) by smtp.gmail.com with ESMTPSA id d14-20020a170902654e00b001743ba85d39sm7902857pln.110.2022.11.14.11.01.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 11:01:35 -0800 (PST) Message-ID: Date: Mon, 14 Nov 2022 11:01:34 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PoC] Let libpq reject unexpected authentication requests Content-Language: en-US To: Aleksander Alekseev , "pgsql-hackers@postgresql.org" Cc: Peter Eisentraut , Michael Paquier , "David G. Johnston" References: <9e5a8ccddb8355ea9fa4b75a1e3a9edc88a70cd3.camel@vmware.com> <914a0125-3dfb-920f-51b6-8d44a8edbdd2@enterprisedb.com> <949f1c20-771c-aef7-058f-2c10885db955@enterprisedb.com> <8e2e5fb6-8225-de8a-b0f9-178c27402367@enterprisedb.com> From: Jacob Champion In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/11/22 22:57, Aleksander Alekseev wrote: > I did a little more research and I think you are right. What happens > according to the C standard: Thanks for confirming! (I personally prefer -1 to a *MAX macro, because it works regardless of the length of the type.) --Jacob