diff -ur zabbix-6.0.25.orig/conf/zabbix_proxy.conf zabbix-6.0.25/conf/zabbix_proxy.conf --- zabbix-6.0.25.orig/conf/zabbix_proxy.conf 2024-01-10 22:40:29.918487677 +0100 +++ zabbix-6.0.25/conf/zabbix_proxy.conf 2024-01-10 22:40:47.909713197 +0100 @@ -153,6 +153,7 @@ ### Option: DBName # Database name. # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. +# If provided name does not contain '/' or ':' (no a path or special type) a .db file in /var/lib/zabbix will be used. # If the Net Service Name connection method is used to connect to Oracle database, specify the service name from # the tnsnames.ora file or set to empty string; also see the TWO_TASK environment variable if DBName is set to # empty string. diff -ur zabbix-6.0.25.orig/src/libs/zbxdb/db.c zabbix-6.0.25/src/libs/zbxdb/db.c --- zabbix-6.0.25.orig/src/libs/zbxdb/db.c 2024-01-10 22:40:29.956488153 +0100 +++ zabbix-6.0.25/src/libs/zbxdb/db.c 2024-01-10 22:40:47.909713197 +0100 @@ -419,6 +419,7 @@ unsigned int i = 0; #elif defined(HAVE_SQLITE3) char *p, *path = NULL; + char dbname_buf[1024]; #endif #ifndef HAVE_MYSQL @@ -878,6 +879,10 @@ ZBX_UNUSED(ca); ZBX_UNUSED(cipher); ZBX_UNUSED(cipher_13); + if (!strchr(dbname, '/') && !strchr(dbname, ':')) { + zbx_snprintf(dbname_buf, sizeof(dbname_buf), "/var/lib/zabbix/%s.db", dbname); + dbname = dbname_buf; + } #ifdef HAVE_FUNCTION_SQLITE3_OPEN_V2 if (SQLITE_OK != sqlite3_open_v2(dbname, &conn, SQLITE_OPEN_READWRITE, NULL)) #else