]> granicus.if.org Git - pgbouncer/commitdiff
Skip commented out lines in auth file.
authorGuillaume Aubert <aubertg@cpan.org>
Thu, 15 May 2014 22:59:01 +0000 (15:59 -0700)
committerGuillaume Aubert <aubertg@cpan.org>
Fri, 23 May 2014 01:11:30 +0000 (18:11 -0700)
src/loader.c

index 94960845618224398c883c845a76ace1ec17cd19..84b90e79187c5bed076f7670c20afccb0fc9e7d0 100644 (file)
@@ -556,6 +556,12 @@ bool load_auth_file(const char *fn)
                if (!*p)
                        break;
 
+               /* skip commented-out lines */
+               if (*p == ';') {
+                       while (*p && *p != '\n') p++;
+                       continue;
+               }
+
                /* start of line */
                if (*p != '"') {
                        log_error("broken auth file");