From: Marko Kreen Date: Sun, 12 Aug 2007 22:33:55 +0000 (+0000) Subject: disable users before loading. X-Git-Tag: pgbouncer_1_1~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f50cd527ed7e3cd0b1610405c490ec49528e1cec;p=pgbouncer disable users before loading. otherwise removing users wont work. --- diff --git a/src/loader.c b/src/loader.c index d394597..3dbfe73 100644 --- a/src/loader.c +++ b/src/loader.c @@ -371,6 +371,17 @@ bool loader_users_check(void) return load_auth_file(cf_auth_file); } +static void disable_users(void) +{ + PgUser *user; + List *item; + + statlist_for_each(item, &user_list) { + user = container_of(item, PgUser, head); + user->passwd[0] = 0; + } +} + /* load list of users from pg_auth/pg_psw file */ bool load_auth_file(const char *fn) { @@ -383,6 +394,8 @@ bool load_auth_file(const char *fn) return false; } + disable_users(); + p = buf; while (*p) { /* skip whitespace and empty lines */