[Date Prev][Date Next] [Chronological] [Thread] [Top]

[BUG FIXES] backend-bdb with subdirs segfault (ITS#2371)



Full_Name: Luc Saillard
Version: 2.1.15
OS: Linux
URL: http://luc.saillard.free.fr/patches/openldap/openldap-subdirs_bdb.patch
Submission from: (NULL) (62.147.141.167)


I want to use subdirs when using the bdb backend to split logfiles accross
volumes. so i define the BDB_SUBDIRS in
openldap-2.1.15/servers/slapd/back-bdb/back-bdb.h.
But it crash just after a compile and test.
The main problem is when we append the directoryname after the basedir. We need
to use strcopy and not strcat. Perhaps we need to use strncpy too ?

-		strcat( &dir[len], BDB_LG_SUBDIR );
+		strcpy( &dir[len], BDB_LG_SUBDIR );

I've defined  BDB_SUBDIRS to 1 by default, feel free to change it. When
installing openldap, i create the 3 directories but not for make test.
This patches is against the last stable openldap 2.1.15.