[dovecot-cvs] dovecot/src/auth db-ldap.c,1.15,1.16 db-pgsql.c,1.4,1.5

cras at procontrol.fi cras at procontrol.fi
Thu Jul 10 07:04:09 EEST 2003


Update of /home/cvs/dovecot/src/auth
In directory danu:/tmp/cvs-serv32098/src/auth

Modified Files:
	db-ldap.c db-pgsql.c 
Log Message:
New configuration file code. Some syntax changes, but tries to be somewhat
backwards compatible. SIGHUP now reverts back to old configuration if it
detected errors in new one.



Index: db-ldap.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/db-ldap.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- db-ldap.c	2 Apr 2003 02:09:41 -0000	1.15
+++ db-ldap.c	10 Jul 2003 03:04:07 -0000	1.16
@@ -14,6 +14,7 @@
 #include "db-ldap.h"
 
 #include <stddef.h>
+#include <stdlib.h>
 
 /* Older versions may require calling ldap_result() twice */
 #if LDAP_VENDOR_VERSION <= 20112
@@ -335,7 +336,8 @@
 
 	conn->config_path = p_strdup(pool, config_path);
 	conn->set = default_ldap_settings;
-	settings_read(config_path, parse_setting, conn);
+	if (!settings_read(config_path, NULL, parse_setting, NULL, conn))
+		exit(FATAL_DEFAULT);
 
 	if (conn->set.base == NULL)
 		i_fatal("LDAP: No base given");

Index: db-pgsql.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/db-pgsql.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- db-pgsql.c	19 Jun 2003 01:59:11 -0000	1.4
+++ db-pgsql.c	10 Jul 2003 03:04:07 -0000	1.5
@@ -12,6 +12,7 @@
 #include "db-pgsql.h"
 
 #include <stddef.h>
+#include <stdlib.h>
 
 #define DEF(type, name) { type, #name, offsetof(struct pgsql_settings, name) }
 
@@ -142,7 +143,8 @@
 
 	conn->config_path = p_strdup(pool, config_path);
 	conn->set = default_pgsql_settings;
-	settings_read(config_path, parse_setting, conn);
+	if (!settings_read(config_path, NULL, parse_setting, NULL, conn))
+		exit(FATAL_DEFAULT);
 
 	(void)pgsql_conn_open(conn);
 



More information about the dovecot-cvs mailing list