Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xtm5B-0005LG-IN for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Nov 2014 23:33:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xtm5A-0000OQ-KH for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Nov 2014 23:33:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xtm59-0000OK-Rc for pgsql-bugs@postgresql.org; Wed, 26 Nov 2014 23:33:11 +0000 Received: from h82-117-100-142.dynamic.se.alltele.net ([82.117.100.142] helo=mea.homelinux.org) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xtm56-0007jw-3U for pgsql-bugs@postgresql.org; Wed, 26 Nov 2014 23:33:10 +0000 Received: from meand by aun with local (Exim 4.69) (envelope-from ) id 1Xtm4t-0002AV-SP; Thu, 27 Nov 2014 00:32:57 +0100 Date: Thu, 27 Nov 2014 00:32:55 +0100 From: Mats Erik Andersson To: pgsql-bugs Cc: Magnus Hagander Message-ID: <20141126233255.GA8130@mail.gisladisker.se> References: <20141116231256.GA15348@mail.gisladisker.se> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Rcpt-To: pgsql-bugs@postgresql.org, magnus@hagander.net, bsd@gisladisker.se X-SA-Exim-Mail-From: mats.andersson@gisladisker.se X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on aun.utmark.mea X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 Subject: Re: [PATCH] initdb: Option description. Content-Type: text/plain; charset=us-ascii X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000) X-SA-Exim-Scanned: Yes (on aun) X-Pg-Spam-Score: 0.4 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org tisdag den 25 november 2014 klockan 13:52 skrev Magnus Hagander detta: > On Mon, Nov 17, 2014 at 12:12 AM, Mats Erik Andersson > wrote: > > Hello there, > > > > the recent introduction of new options `--auth-local' > > and `--auth-host' have lead to some confusion in the > > help massage for inetdb, leaving an erroneous `local' > > for `--auth' and `--auth-host'. Please consider the > > following patch to improve the relevance. > > Hi! > > The idea behind the current wording is that it only sets the > authentication type for 127.0.0.1 and ::1 -- there is no entry in > pg_hba.conf generated for non-local TCP/IP connections. Perhaps we > could clarify it by saying "localhost TCP/IP" rather than "local > TCP/IP" though? Even admitting that the template is stated for localhost only, it seems clearer in my view to ignore this technicality in the message. Scaring the administrator slightly is no bad thing. My misinterpretation of "local" in "initdb.c" continues in two more messages, so let me mention also them in order to make the discussion complete. I accept to be contradicted, but letting others see the explicit changes might provoke [sic] an optimal motivation for any decision! Best regards, Mats Erik Andersson diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 3b52867..0dcceda 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -159,9 +159,9 @@ static char *dynamic_shared_memory_type = NULL; * Warning messages for authentication methods */ #define AUTHTRUST_WARNING \ -"# CAUTION: Configuring the system for local \"trust\" authentication\n" \ -"# allows any local user to connect as any PostgreSQL user, including\n" \ -"# the database superuser. If you do not trust all your local users,\n" \ +"# CAUTION: Configuring the system for \"trust\" authentication\n" \ +"# allows any user to connect as any PostgreSQL user, including\n" \ +"# the database superuser. If you do not trust all your users,\n" \ "# use another authentication method.\n" static char *authwarning = NULL; @@ -2868,8 +2868,8 @@ usage(const char *progname) printf(_("Usage:\n")); printf(_(" %s [OPTION]... [DATADIR]\n"), progname); printf(_("\nOptions:\n")); - printf(_(" -A, --auth=METHOD default authentication method for local connections\n")); - printf(_(" --auth-host=METHOD default authentication method for local TCP/IP connections\n")); + printf(_(" -A, --auth=METHOD default authentication method for all connections\n")); + printf(_(" --auth-host=METHOD default authentication method for TCP/IP connections\n")); printf(_(" --auth-local=METHOD default authentication method for local-socket connections\n")); printf(_(" [-D, --pgdata=]DATADIR location for this database cluster\n")); printf(_(" -E, --encoding=ENCODING set default encoding for new databases\n")); @@ -2906,7 +2906,7 @@ check_authmethod_unspecified(const char **authmethod) { if (*authmethod == NULL || strlen(*authmethod) == 0) { - authwarning = _("\nWARNING: enabling \"trust\" authentication for local connections\n" + authwarning = _("\nWARNING: Enabling \"trust\" authentication for some connections.\n" "You can change this by editing pg_hba.conf or using the option -A, or\n" "--auth-local and --auth-host, the next time you run initdb.\n"); *authmethod = "trust"; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs