[PATCH] pg_autovacuum commandline password hiding.

Поиск
Список
Период
Сортировка
От Ian FREISLICH
Тема [PATCH] pg_autovacuum commandline password hiding.
Дата
Msg-id E1DaTRK-000H7r-2P@hetzner.co.za
обсуждение исходный текст
Ответы Re: [PATCH] pg_autovacuum commandline password hiding.
Re: [PATCH] pg_autovacuum commandline password hiding.
Список pgsql-patches
Hi

I'm not sure if you've done this for a later version of pg_autovacuum.
I'm using what came with postgres-7.4.6.  For database security on
a shared server (~800 logins) it's best to set the superuser password
and not allow passwordless connections.  The only thing is that
pg_autovacuum keeps the password supplied on the commandline so
anyone that does a 'ps' can get the database superuser password.

--- pg_autovacuum.c.orig        Mon Apr 18 08:08:27 2005
+++ pg_autovacuum.c     Mon Apr 18 07:57:59 2005
@@ -879,7 +879,8 @@
                                args->user = optarg;
                                break;
                        case 'P':
-                               args->password = optarg;
+                               args->password = strdup(optarg);
+                               for (c = 0; optarg[c]; optarg[c++] = 'x');
                                break;
                        case 'H':
                                args->host = optarg;

I hope that this is a worthwhile patch.

Ian


--
Ian Freislich

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Exec statement logging
Следующее
От: Neil Conway
Дата:
Сообщение: Re: [PATCH] pg_autovacuum commandline password hiding.