Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ingo Voss
OpenLDAP
Commits
7439661c
Commit
7439661c
authored
Aug 13, 2005
by
Pierangelo Masarati
Browse files
import fix to ITS#3932
parent
12b7500b
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
7439661c
...
...
@@ -15,6 +15,7 @@ OpenLDAP 2.2.28 Release
Fixed syncrepl SASL bind crash (ITS#3792)
Fixed slurpd error messages
Fixed libldap infinite referral loop (ITS#2894, ITS#3578)
Fixed librewrite regex concurrency issue (ITS#3932)
Use IANA assigned OIDs for recently approved IETF LDAP extensions
Build Environment
Fixed test020 logging problem (ITS#3811)
...
...
libraries/librewrite/rewrite-int.h
View file @
7439661c
...
...
@@ -206,6 +206,9 @@ struct rewrite_rule {
char
*
lr_pattern
;
char
*
lr_subststring
;
char
*
lr_flagstring
;
#ifdef USE_REWRITE_LDAP_PVT_THREADS
ldap_pvt_thread_mutex_t
lr_mutex
;
#endif
/* USE_REWRITE_LDAP_PVT_THREADS */
regex_t
lr_regex
;
/*
...
...
libraries/librewrite/rule.c
View file @
7439661c
...
...
@@ -346,6 +346,14 @@ rewrite_rule_compile(
return
REWRITE_ERR
;
}
#ifdef USE_REWRITE_LDAP_PVT_THREADS
if
(
ldap_pvt_thread_mutex_init
(
&
rule
->
lr_mutex
)
)
{
regfree
(
&
rule
->
lr_regex
);
free
(
rule
);
return
REWRITE_ERR
;
}
#endif
/* USE_REWRITE_LDAP_PVT_THREADS */
/*
* Just to remember them ...
*/
...
...
@@ -418,7 +426,14 @@ recurse:;
rule
->
lr_pattern
,
string
,
strcnt
+
1
);
op
->
lo_num_passes
++
;
if
(
regexec
(
&
rule
->
lr_regex
,
string
,
nmatch
,
match
,
0
)
!=
0
)
{
#ifdef USE_REWRITE_LDAP_PVT_THREADS
ldap_pvt_thread_mutex_lock
(
&
rule
->
lr_mutex
);
#endif
/* USE_REWRITE_LDAP_PVT_THREADS */
rc
=
regexec
(
&
rule
->
lr_regex
,
string
,
nmatch
,
match
,
0
);
#ifdef USE_REWRITE_LDAP_PVT_THREADS
ldap_pvt_thread_mutex_unlock
(
&
rule
->
lr_mutex
);
#endif
/* USE_REWRITE_LDAP_PVT_THREADS */
if
(
rc
!=
0
)
{
if
(
*
result
==
NULL
&&
strcnt
>
0
)
{
free
(
string
);
string
=
NULL
;
...
...
@@ -488,6 +503,9 @@ rewrite_rule_destroy(
}
regfree
(
&
rule
->
lr_regex
);
#ifdef USE_REWRITE_LDAP_PVT_THREADS
ldap_pvt_thread_mutex_destroy
(
&
rule
->
lr_mutex
);
#endif
/* USE_REWRITE_LDAP_PVT_THREADS */
for
(
action
=
rule
->
lr_action
;
action
;
)
{
struct
rewrite_action
*
curraction
=
action
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment