]> granicus.if.org Git - pgbouncer/commitdiff
don't load auth file twice at boot
authorCody Cutrer <cody@instructure.com>
Wed, 28 Aug 2013 18:57:12 +0000 (12:57 -0600)
committerCody Cutrer <cody@instructure.com>
Fri, 27 Sep 2013 19:36:19 +0000 (13:36 -0600)
the stat wasn't getting cached on the initial load, so immediately
after booting the janitor would notice it "changed", and reload it

src/loader.c
src/main.c

index 9b914a6ea73209ca9552ab6d368509f0f65d32c4..d1ab7b622006c731d3eb6e6fc7b1fe2bc8c38f0b 100644 (file)
@@ -463,6 +463,7 @@ bool load_auth_file(const char *fn)
                return false;
        }
 
+       log_debug("loading auth_file: \"%s\"", fn);
        disable_users();
 
        p = buf;
index 1b83d6a470116a18fb82c3a914635cc1ecbec8fc..a541bfe82f0d2420c27cefd3886fd85005a0051d 100644 (file)
@@ -302,7 +302,7 @@ void load_config(void)
        if (ok) {
                /* load users if needed */
                if (cf_auth_type >= AUTH_TRUST)
-                       load_auth_file(cf_auth_file);
+                       loader_users_check();
                loaded = true;
        } else if (!loaded) {
                die("Cannot load config file");