Project

General

Profile

Actions

Bug #1694

closed

mod_postgresql_vhost not sending password in connect string

Added by Anonymous almost 16 years ago. Updated over 15 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

mod_postgresql_vhost is not sending the password part of the connect string. Logs show:

mod_postgresql_vhost.c.251: (error) Bad connection for 'host=192.168.1.10 dbname=lighttpd user=lighttpd': fe_sendauth: no password supplied

I played around with src/mod_postgresql_vhost.c and added:

BUFFER_APPEND_STRING_CONST(s->conninfo, " ");
BUFFER_APPEND_STRING_CONST(s->conninfo, "password=");
buffer_append_string_buffer(s->conninfo, s->core->pass);

under the other connect string parts at about line 171 and it is working now.

To get things to compile I also had to remove -lpgport from the

POSTGRESQL_LIBS="$POSTGRESQL_LIBS -lpgport -lpq -lrt"

line in configure.in. Not sure if that is just something with my systems, but it would not compile as there is no pgport library. Removing it allowed compile and it works.

OS: FreeBSD 7.0
Postgresql: postgresql-client-8.2.6_1 from ports
lighttpd-1.5.0-r1992, but appears to be same in trunk

--Matt

-- matt


Files

mod_postgresql_vhost.c.patch (467 Bytes) mod_postgresql_vhost.c.patch patch to send passwords in src/mod_postgresql_vhost.c -- matt Anonymous, 2008-06-20 16:54
Actions #1

Updated by stbuehler over 15 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2239

Actions

Also available in: Atom