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

(ITS#6933) Broken NT Service ConfigFile param



Full_Name: Hallvard B Furuseth
Version: master, 2.4.24
OS: Windows NT + what else?
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (129.240.6.233)


slapd/main.c does
#ifdef HAVE_NT_SERVICE_MANAGER
		newConfigFile = (char*)lutil_getRegParam( regService, "ConfigFile" );
		newConfigDir = (char*)lutil_getRegParam( regService, "ConfigDir" );
but does not strdup() newConfigFile even though lutil_getRegParam returns static
memory.
Thus ConfigDir can overwrite ConfigFile.  Don't know if that only happens if
both are
set, since I do not know NT.

Fixing: Adding the strdup()s.

Which OSes does this apply to? Only Windows NT, or more than that
the same way as #ifdef _WIN32 also tests for newer Windowses?