pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Giles Lean <giles@nemeton.com.au>
To: Brett W. McCoy <bmccoy@chapelperilous.net>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: DBD::Pg 0.96 and DBI 1.15 ignoring username and password
Date: Sun, 15 Apr 2001 10:59:26 +1000
Message-ID: <17239.987296366@nemeton.com.au> (raw)
In-Reply-To: <bmccoy@chapelperilous.net> <Pine.LNX.4.30.0104142018080.12687-100000@chapelperilous.net>


> If I change pg_hba.conf to 'trust' on localhost, (and unset $PGHOST) and I
> run the same script, it tells me that 'bmccoy' (who I am logged in as)
> does not exist as a user (which is true).  It looks like the user and
> password fields are being completely ignored by DBD::Pg.
>
> What happened?

New bug introduced.  Here's an (unofficial) fix.  I just sent it to the
dbi-users list and Edmund Mergl in reply to a message on the dbi-users
list, so I've dropped that list from this reply.

Regards,

Giles

inline patch 1: DBD-Pg-0.96/Pg.pm (+4/-5 lines) download inline-1.patch*** DBD-Pg-0.96/Pg.pm-orig Tue Apr 10 03:44:18 2001 --- DBD-Pg-0.96/Pg.pm Sun Apr 15 10:26:16 2001 *************** *** 79,89 **** $Name =~ s/^.*dbname\s*=\s*//; $Name =~ s/\s*;.*$//; ! $user = "" unless defined($user); ! $auth = "" unless defined($auth); ! ! $user = $ENV{DBI_USER} unless $user eq ""; ! $auth = $ENV{DBI_PASS} unless $auth eq ""; my($dbh) = DBI::_new_dbh($drh, { 'Name' => $Name, --- 79,88 ---- $Name =~ s/^.*dbname\s*=\s*//; $Name =~ s/\s*;.*$//; ! $user ||= $ENV{DBI_USER}; ! $auth ||= $ENV{DBI_PASS}; ! $user ||= ""; ! $auth ||= ""; my($dbh) = DBI::_new_dbh($drh, { 'Name' => $Name,

view thread (5+ messages)  latest in thread

Message-ID: <17239.987296366@nemeton.com.au>
Permalink:  ../17239.987296366@nemeton.com.au/
Also on:    postgresql.org/message-id/17239.987296366@nemeton.com.au

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: giles@nemeton.com.au, bmccoy@chapelperilous.net
  Subject: Re: DBD::Pg 0.96 and DBI 1.15 ignoring username and password
  In-Reply-To: <17239.987296366@nemeton.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox