Re: [BUGS] BUG #1134: ALTER USER ... RENAME breaks md5 passwords
| От | Bruce Momjian |
|---|---|
| Тема | Re: [BUGS] BUG #1134: ALTER USER ... RENAME breaks md5 passwords |
| Дата | |
| Msg-id | 200405061749.i46HntP24072@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: [BUGS] BUG #1134: ALTER USER ... RENAME breaks md5 passwords (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-patches |
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > The attached patch clears the password field on rename:
> >
> > I think you should clear the password field *only* if it's
> > MD5-encrypted.
>
> Patch attached and applied.
Oh, I forgot to display the new behavior:
test=> CREATE USER test;
CREATE USER
test=> ALTER USER test RENAME TO test2;
ALTER USER
test=> ALTER USER test2 UNENCRYPTED PASSWORD 'x';
ALTER USER
test=> ALTER USER test2 RENAME TO test4;
ALTER USER
test=> ALTER USER test4 PASSWORD 'x';
ALTER USER
test=> ALTER USER test4 RENAME TO test8;
NOTICE: MD5 password cleared because of user rename
ALTER USER
test=> SELECT * FROM pg_shadow WHERE usename = 'test8';
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd |
valuntil | useconfig
---------+----------+-------------+----------+-----------+--------+----------+-----------
test8 | 100 | f | f | f | |
|
(1 row)
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-patches по дате отправления: