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

NT port of slapd (ITS#869)

Full_Name: Jim Hud
Version: 2.0.6
OS: NT4 sp6
Submission from: (NULL) (

When slapd is compiled with HAVE_NT_SERVICE_MANAGER and slapd is actually run as
a service, the main slapd routine (ServiceMain) is run twice, once when the
service starts and once when it stops.  This is because the logic in nt_svc.c
which decides if ServiceMain should be called uses StartServiceCtrlDispatcher
which itself calls ServiceMain.

ServiceMain is not tolerant of being called twice and the ldbm backend causes a
crash the second time it is run.  This is in ldbm_back_db_destroy which does a
free(be->be_private) which is NULL from the previous call.