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 1onX4w-0007T7-Ec for pgsql-committers@arkaria.postgresql.org; Wed, 26 Oct 2022 03:27: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 1onX4v-0005PP-3B for pgsql-committers@arkaria.postgresql.org; Wed, 26 Oct 2022 03:27: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 1onX4u-0005PF-QN for pgsql-committers@lists.postgresql.org; Wed, 26 Oct 2022 03:27:40 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1onX4p-0000gY-U0 for pgsql-committers@lists.postgresql.org; Wed, 26 Oct 2022 03:27:40 +0000 Received: by mail-pj1-x1031.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so1165125pjc.3 for ; Tue, 25 Oct 2022 20:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LURhA70mSqeMB9uekS+zsJbq1sBIHFBlbTGBsO1PhHo=; b=X7DwvOFWvW8BuMiUO7BBo8DrhKvjeUUyoIEuqhkqhehdY81LQe3gFnFpGAqMtuXKnZ NBgBy3734WlZxbLGN9PJxLvfKMNeH4v80GN9tWHX+DxdoghoMig3iIvKhCCqlEsTY6NJ ZCexe0CVzK62SIlQIzegRxDme2nnc+pFGQdAzE2Nn+RlrroUA+Ic7Xr0yd/yNVfn6NSj QiYuwx7w29F40uAhyv9aYuHsca7kRwLNqIplv4PvXNzxMfMtF6K95ICH4F8zWTijWFU7 ooU6nMG94U0GIcK54aduoaw3UraP0T3xeKDMbVPyoZTyR9NkxGM0Qqm4mcXWTj1R1z3O 59Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LURhA70mSqeMB9uekS+zsJbq1sBIHFBlbTGBsO1PhHo=; b=a2FMBrPWtCevbgH0LXkuqXPcqHVa5iZYL89DK8Agr1GYAaIg0GEXzV8XCkS1QLaZfs nPRTForsQ2JXA6bllB1BE7Wz1qCnXMkpHcg4cuXLbfoqgR6lrJ6qbuPMXRLVCjs0+5ym +NNziQZ8ubbV/AWs3Bon+Ob5oMIRcfvQHFkzhwkSuqQAOsAT7U9/YAw1aIRhnG8SeXwE doXxmJ2I6brRffvllKBfwt8h8dT+y68dJEzGKoTmuk0uBHHTMuAcL8ByWpTHLsyU6+pN vR6QBaeSPNHA+zahgr0uIXlEw1zl9tdwDYtfhQPiUo3I8cIxv6L5g5+D5VSIlNaEgm+9 Vu8Q== X-Gm-Message-State: ACrzQf2qEfnYXygBBuonFIaWNqi2S43Cm7XNO6+5aPZKj7UmfJ1cvx5l Gy2gTv4MziB0SHJvIIDjmSg= X-Google-Smtp-Source: AMsMyM7vCwnXb1AFJdjzOualwguERm3auyhuOfRmPn5CR3n0SBMnesCfe6VSsXJPxNOI3HkXiAMFsg== X-Received: by 2002:a17:902:c7c4:b0:186:5ebe:38e with SMTP id r4-20020a170902c7c400b001865ebe038emr33034471pla.33.1666754853698; Tue, 25 Oct 2022 20:27:33 -0700 (PDT) Received: from jrouhaud (2001-b011-1006-d206-3802-ee2a-fd04-f51c.dynamic-ip6.hinet.net. [2001:b011:1006:d206:3802:ee2a:fd04:f51c]) by smtp.gmail.com with ESMTPSA id ms19-20020a17090b235300b0020ad53b5883sm325553pjb.14.2022.10.25.20.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 20:27:32 -0700 (PDT) Date: Wed, 26 Oct 2022 11:27:30 +0800 From: Julien Rouhaud To: Michael Paquier Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Refactor code handling the names of files loaded in hba.c Message-ID: <20221026032730.k3sib5krgm7l6njk@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Wed, Oct 26, 2022 at 02:53:08AM +0000, Michael Paquier wrote: > Refactor code handling the names of files loaded in hba.c For the record there is a couple of thinko in the extracted patch: @@ -1063,6 +1064,7 @@ HbaLine * parse_hba_line(TokenizedAuthLine *tok_line, int elevel) { int line_num = tok_line->line_num; + char *file_name = tok_line->file_name; char **err_msg = &tok_line->err_msg; char *str; struct addrinfo *gai_result; @@ -1077,6 +1079,7 @@ parse_hba_line(TokenizedAuthLine *tok_line, int elevel) HbaLine *parsedline; parsedline = palloc0(sizeof(HbaLine)); + parsedline->sourcefile = pstrdup(tok_line->file_name); This should have used the "file_name" variable rather than accessing it via tok_line, same for parse_ident_line. I fixed it in the v14 sent on the main thread, unfortunately sent a bit too late.