1 diff -dur zabbix-3.2.0.orig/conf/zabbix_proxy.conf zabbix-3.2.0/conf/zabbix_proxy.conf
2 --- zabbix-3.2.0.orig/conf/zabbix_proxy.conf 2016-10-01 17:44:08.000000000 +0200
3 +++ zabbix-3.2.0/conf/zabbix_proxy.conf 2016-10-01 18:00:48.000000000 +0200
7 # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
8 +# If provided name does not contain '/' or ':' (no a path or special type) a .db file in /var/lib/zabbix will be used.
9 # Warning: do not attempt to use the same database Zabbix server is using.
12 diff -dur zabbix-3.2.0.orig/conf/zabbix_server.conf zabbix-3.2.0/conf/zabbix_server.conf
13 --- zabbix-3.2.0.orig/conf/zabbix_server.conf 2016-10-01 17:44:08.000000000 +0200
14 +++ zabbix-3.2.0/conf/zabbix_server.conf 2016-10-01 17:50:32.000000000 +0200
18 # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
19 +# If provided name does not contain '/' or ':' (no a path or special
20 +# type) a .db file in /var/lib/zabbix will be used.
24 diff -dur zabbix-3.2.0.orig/src/libs/zbxdb/db.c zabbix-3.2.0/src/libs/zbxdb/db.c
25 --- zabbix-3.2.0.orig/src/libs/zbxdb/db.c 2016-09-13 14:20:56.000000000 +0200
26 +++ zabbix-3.2.0/src/libs/zbxdb/db.c 2016-10-01 17:59:19.000000000 +0200
29 #elif defined(HAVE_SQLITE3)
30 char *p, *path = NULL;
31 + char dbname_buf[1024];
34 /* Allow executing statements during a connection initialization. Make sure to mark transaction as failed. */
36 #elif defined(HAVE_SQLITE3)
39 + if (!strchr(dbname, '/') && !strchr(dbname, ':')) {
40 + zbx_snprintf(dbname_buf, sizeof(dbname_buf), "/var/lib/zabbix/%s.db", dbname);
41 + dbname = dbname_buf;
44 #ifdef HAVE_FUNCTION_SQLITE3_OPEN_V2
45 if (SQLITE_OK != sqlite3_open_v2(dbname, &conn, SQLITE_OPEN_READWRITE, NULL))