0ae9789410
- fixes the PostgreSQL backend that failed to connect - allows clients to link against libdspam when LDAP is turned on
22 lines
894 B
Plaintext
22 lines
894 B
Plaintext
$OpenBSD: patch-src_pgsql_drv_c,v 1.3 2006/06/08 14:41:08 todd Exp $
|
|
--- src/pgsql_drv.c.orig Tue Jun 6 17:46:06 2006
|
|
+++ src/pgsql_drv.c Wed Jun 7 13:36:39 2006
|
|
@@ -1146,7 +1146,7 @@ _ds_get_signature (DSPAM_CTX * CTX, stru
|
|
|
|
p = _pgsql_drv_getpwuid (CTX, uid);
|
|
if (!p) {
|
|
- LOG(LOG_CRIT, "_ds_get_signature(): _mysql_drv_getpwuid(%d) failed: aborting", uid);
|
|
+ LOG(LOG_CRIT, "_ds_get_signature(): _pgsql_drv_getpwuid(%d) failed: aborting", uid);
|
|
return EFAILURE;
|
|
}
|
|
username = strdup(p->pw_name);
|
|
@@ -1405,7 +1405,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
|
|
virtual_username,
|
|
virtual_table);
|
|
#else
|
|
- strcpy (query, "DECLARE dscursor CURSOR FOR SELECT DISTINCT uid FROM dspam_stats");
|
|
+ strlcpy (query, "DECLARE dscursor CURSOR FOR SELECT DISTINCT uid FROM dspam_stats", sizeof (query));
|
|
#endif
|
|
|
|
result = PQexec(s->dbh, query);
|