From 409a85203e2185bb69e76532831386103204a41f Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: May 03 2012 14:23:15 +0000 Subject: Ticket #348 - crash in ldap_initialize with multiple threads https://fedorahosted.org/389/ticket/348 Resolves: Ticket #348 Bug Description: crash in ldap_initialize with multiple threads Reviewed by: mreynolds (Thanks!) Branch: rhel-6.3 Fix Description: ldclt was not calling PR_Init - needed in order to use PR_CallOnce Platforms tested: RHEL6 x86_64 Flag Day: no Doc impact: no (cherry picked from commit 9368250f2db4353cec7b489cb48c9c1f192f5c90) --- diff --git a/ldap/servers/slapd/tools/ldclt/ldclt.c b/ldap/servers/slapd/tools/ldclt/ldclt.c index a00058b..27a2412 100644 --- a/ldap/servers/slapd/tools/ldclt/ldclt.c +++ b/ldap/servers/slapd/tools/ldclt/ldclt.c @@ -295,6 +295,7 @@ dd/mm/yy | Author | Comments #include /* struct rlimit, etc... */ #endif +#include "nspr.h" #include "port.h" /* Portability definitions */ /*JLS 29-11-00*/ #include "ldclt.h" /* This tool's include file */ #include "utils.h" /* Utilities functions */ /*JLS 16-11-00*/ @@ -2652,6 +2653,7 @@ main ( int found; /* General purpose variable */ /*JLS 18-12-00*/ char verStr[40]; /* Version string */ /*JLS 13-03-01*/ + PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 0); /* for PR_CallOnce, others */ /* * Build the argv list to keep track of it... * Print version.