Skip site navigation (1) Skip section navigation (2)

pgsql/src/bin/psql command.c

From: momjian(at)postgresql(dot)org
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src/bin/psql command.c
Date: 2001-10-11 16:54:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
CVSROOT:	/cvsroot
Module name:	pgsql
Changes by:	momjian(at)postgresql(dot)org	01/10/11 12:54:18

Modified files:
	src/bin/psql   : command.c 

Log message:
	Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
	> As you can see, psql reconnect as any user if the password is same as
	> foo. Of course this is due to the careless password setting, but I
	> think it's better to prompt ANY TIME the user tries to switch to
	> another user. Comments?
	Yeah, I agree.  Looks like a simple change in dbconnect():
	* Use old password if no new one given (if you didn't have an old
	* one, fine)
	if (!pwparam && oldconn)
	pwparam = PQpass(oldconn);
	* Use old password (if any) if no new one given and we are
	* reconnecting as same user
	if (!pwparam && oldconn && PQuser(oldconn) && userparam &&
	strcmp(PQuser(oldconn), userparam) == 0)
	pwparam = PQpass(oldconn);
	regards, tom lane

pgsql-committers by date

Next:From: tglDate: 2001-10-11 18:06:53
Subject: pgsql/src/backend/utils/adt datetime.c
Previous:From: momjianDate: 2001-10-11 16:35:50
Subject: pgsql/doc TODO

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group