This patch allows to connect to the server using the local (unix) socket, thus not using a network socket and SSL encryption. Local connection is used if host parameter is omitted or empty. Signed-off-by: Pierre Chifflier <chifflier@xxxxxx> --- output/pgsql/ulogd_output_PGSQL.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/output/pgsql/ulogd_output_PGSQL.c b/output/pgsql/ulogd_output_PGSQL.c index afab2cc..39ffdb4 100644 --- a/output/pgsql/ulogd_output_PGSQL.c +++ b/output/pgsql/ulogd_output_PGSQL.c @@ -237,8 +237,9 @@ static int open_db_pgsql(struct ulogd_pluginstance *upi) connstr = (char *) malloc(len); if (!connstr) return -ENOMEM; + connstr[0] = '\0'; - if (server) { + if (server && strlen(server)>0) { strcpy(connstr, " host="); strcat(connstr, server); } -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html