ldap/servers
by Richard Allen Megginson
ldap/servers/plugins/acl/acl.c | 3 +++
ldap/servers/plugins/acl/acl.h | 2 ++
ldap/servers/plugins/acl/aclplugin.c | 8 ++++++--
3 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 742032c11f0dabbdc80ba204801c27c4cbe305a4
Author: Endi S. Dewata <edewata(a)redhat.com>
Date: Sat Mar 20 21:03:59 2010 -0500
Bug 520151 - Error when modifying userPassword with proxy user
https://bugzilla.redhat.com/show_bug.cgi?id=520151
Resolves: bug 520151
Bug description: Error when modifying userPassword with proxy user
Fix description: The acl_access_allowed() has been modified to
call aclplugin_preop_common() which will initialize the aclpb.
The aclplugin_preop_common() has been modified to check for the
ACLPB_INITIALIZED flag to avoid re-initializing aclpb.
Reviewed by: rmeggins (and pushed by)
diff --git a/ldap/servers/plugins/acl/acl.c b/ldap/servers/plugins/acl/acl.c
index df2f4e4..aa22d56 100644
--- a/ldap/servers/plugins/acl/acl.c
+++ b/ldap/servers/plugins/acl/acl.c
@@ -323,6 +323,9 @@ acl_access_allowed(
/* Get the bindDN */
slapi_pblock_get ( pb, SLAPI_REQUESTOR_DN, &clientDn );
+ /* Initialize aclpb */
+ aclplugin_preop_common( pb );
+
/* get the right acl pblock to work with */
if ( access & SLAPI_ACL_PROXY )
aclpb = acl_get_aclpb ( pb, ACLPB_PROXYDN_PBLOCK );
diff --git a/ldap/servers/plugins/acl/acl.h b/ldap/servers/plugins/acl/acl.h
index d8bc507..36bdd43 100644
--- a/ldap/servers/plugins/acl/acl.h
+++ b/ldap/servers/plugins/acl/acl.h
@@ -927,4 +927,6 @@ acl_get_effective_rights ( Slapi_PBlock *pb, Slapi_Entry *e,
char* aclutil__access_str (int type , char str[]);
+int aclplugin_preop_common( Slapi_PBlock *pb );
+
#endif /* _ACL_H_ */
diff --git a/ldap/servers/plugins/acl/aclplugin.c b/ldap/servers/plugins/acl/aclplugin.c
index 881d0f1..12c435d 100644
--- a/ldap/servers/plugins/acl/aclplugin.c
+++ b/ldap/servers/plugins/acl/aclplugin.c
@@ -54,7 +54,7 @@ char *plugin_name = ACL_PLUGIN_NAME;
static int aclplugin_preop_search ( Slapi_PBlock *pb );
static int aclplugin_preop_modify ( Slapi_PBlock *pb );
-static int aclplugin_preop_common ( Slapi_PBlock *pb );
+int aclplugin_preop_common ( Slapi_PBlock *pb );
/*******************************************************************************
* ACL PLUGIN Architecture
@@ -192,7 +192,7 @@ aclplugin_preop_modify ( Slapi_PBlock *pb )
* 0 - all is well; proceed.
* 1 - fatal error; result has been sent to client.
*/
-static int
+int
aclplugin_preop_common( Slapi_PBlock *pb )
{
char *proxy_dn; /* id being assumed */
@@ -205,6 +205,9 @@ aclplugin_preop_common( Slapi_PBlock *pb )
aclpb = acl_get_aclpb ( pb, ACLPB_BINDDN_PBLOCK );
+ /* See if we have initialized already */
+ if ( aclpb->aclpb_state & ACLPB_INITIALIZED ) goto done;
+
/*
* The following mallocs memory for proxy_dn, but not the dn.
* The proxy_dn is the id being assumed, while dn
@@ -248,6 +251,7 @@ aclplugin_preop_common( Slapi_PBlock *pb )
}
+done:
TNF_PROBE_0_DEBUG(aclplugin_preop_common_end ,"ACL","");
return 0;
14 years
Branch 'refs/remotes/fedora/Directory_Server_8_2_Branch' - ldap/servers
by Richard Allen Megginson
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 8 +++++++-
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 4 ++++
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 03c2dcc26a50f58348d1cb201f912fdb5839b79f
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Mar 23 19:08:13 2010 -0600
Bug 571677 - Busy replica on consumers when directly deleting a replication conflict
https://bugzilla.redhat.com/show_bug.cgi?id=571677
Resolves: bug 571677
Bug Description: Busy replica on consumers when directly deleting a replication conflict
Reviewed by: nhosoi (Thanks!)
Branch: HEAD
Fix Description: In some cases, urp fixup operations can be called from
the bepreop stage of other operations. The ldbm_back_delete() and
ldbm_back_modify() code lock the target entry in the cache. If a bepreop
then attempts to operate on the same entry and acquire the lock on the
entry, deadlock will occur.
The modrdn code does not acquire the cache lock on the target entries
before calling the bepreops. The modify and delete code does not acquire
the cache lock on the target entries before calling the bepostops.
I tried unlocking the target entry before calling the bepreops, then locking
the entry just after. This causes the problem to disappear, but I do not
know if this will lead to race conditions. The modrdn has been working this
way forever, and there are no known race conditions with that code.
I think the most robust fix for this issue would be to introduce some sort
of semaphore instead of a simple mutex on the cached entry. Then
cache_lock_entry would look something like this:
if entry->sem == 0
entry->sem++ /* acquire entry */
entry->locking_thread = this_thread
else if entry->locking_thread == this_thread
entry->sem++ /* increment count on this entry */
else
wait_for_sem(entry->sem) /* wait until released */
and cache_unlock_entry would look something like this:
entry->sem--;
if entry->sem == 0
entry->locking_thread = 0
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
cherry picked from eac3f15f2209719e05640e1576b4273d03bef079
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index 9cb961c..c1cb1cf 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -178,6 +178,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
/* Don't call pre-op for Tombstone entries */
if (!delete_tombstone_entry)
{
+ int rc = 0;
/*
* Some present state information is passed through the PBlock to the
* backend pre-op plugin. To ensure a consistent snapshot of this state
@@ -191,7 +192,12 @@ ldbm_back_delete( Slapi_PBlock *pb )
goto error_return;
}
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
- if(plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_DELETE_FN)==-1)
+ /* have to unlock the entry here, in case the bepreop attempts
+ to modify the same entry == deadlock */
+ cache_unlock_entry( &inst->inst_cache, e );
+ rc = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_DELETE_FN);
+ cache_lock_entry( &inst->inst_cache, e );
+ if (rc == -1)
{
/*
* Plugin indicated some kind of failure,
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 2b17eee..ecd42c9 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -294,7 +294,11 @@ ldbm_back_modify( Slapi_PBlock *pb )
/* ec is the entry that our bepreop should get to mess with */
slapi_pblock_set( pb, SLAPI_MODIFY_EXISTING_ENTRY, ec->ep_entry );
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
+ /* have to unlock the entry here, in case the bepreop attempts
+ to modify the same entry == deadlock */
+ cache_unlock_entry( &inst->inst_cache, e );
plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_MODIFY_FN);
+ cache_lock_entry( &inst->inst_cache, e );
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
/* The Plugin may have messed about with some of the PBlock parameters... ie. mods */
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index 0dd8eb2..8cb7173 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -876,6 +876,7 @@ common_return:
cache_return( &inst->inst_cache, &ec );
}
+ moddn_unlock_and_return_entries(be,&e,&existingentry);
/*
* The bepostop is called even if the operation fails.
*/
@@ -889,7 +890,6 @@ common_return:
slapi_mods_done(&smods_operation_wsi);
slapi_mods_done(&smods_generated);
slapi_mods_done(&smods_generated_wsi);
- moddn_unlock_and_return_entries(be,&e,&existingentry);
slapi_ch_free((void**)&child_entries);
slapi_ch_free((void**)&child_entry_copies);
if (ldap_result_matcheddn && 0 != strcmp(ldap_result_matcheddn, "NULL"))
14 years
Changes to 'ds82'
by Richard Allen Megginson
New branch 'ds82' available with the following commits:
commit 8669f254cfd0d1fd1189a947c80f992ca0cd604f
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Mar 23 19:08:13 2010 -0600
Bug 571677 - Busy replica on consumers when directly deleting a replication conflict
https://bugzilla.redhat.com/show_bug.cgi?id=571677
Resolves: bug 571677
Bug Description: Busy replica on consumers when directly deleting a replication conflict
Reviewed by: nhosoi (Thanks!)
Branch: Directory_Server_8_2_Branch
Fix Description: In some cases, urp fixup operations can be called from
the bepreop stage of other operations. The ldbm_back_delete() and
ldbm_back_modify() code lock the target entry in the cache. If a bepreop
then attempts to operate on the same entry and acquire the lock on the
entry, deadlock will occur.
The modrdn code does not acquire the cache lock on the target entries
before calling the bepreops. The modify and delete code does not acquire
the cache lock on the target entries before calling the bepostops.
I tried unlocking the target entry before calling the bepreops, then locking
the entry just after. This causes the problem to disappear, but I do not
know if this will lead to race conditions. The modrdn has been working this
way forever, and there are no known race conditions with that code.
I think the most robust fix for this issue would be to introduce some sort
of semaphore instead of a simple mutex on the cached entry. Then
cache_lock_entry would look something like this:
if entry->sem == 0
entry->sem++ /* acquire entry */
entry->locking_thread = this_thread
else if entry->locking_thread == this_thread
entry->sem++ /* increment count on this entry */
else
wait_for_sem(entry->sem) /* wait until released */
and cache_unlock_entry would look something like this:
entry->sem--;
if entry->sem == 0
entry->locking_thread = 0
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
cherry picked from eac3f15f2209719e05640e1576b4273d03bef079
14 years
ldap/servers
by Richard Allen Megginson
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 8 +++++++-
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 4 ++++
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit eac3f15f2209719e05640e1576b4273d03bef079
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Mar 23 19:08:13 2010 -0600
Bug 571677 - Busy replica on consumers when directly deleting a replication conflict
https://bugzilla.redhat.com/show_bug.cgi?id=571677
Resolves: bug 571677
Bug Description: Busy replica on consumers when directly deleting a replication conflict
Reviewed by: nhosoi (Thanks!)
Branch: HEAD
Fix Description: In some cases, urp fixup operations can be called from
the bepreop stage of other operations. The ldbm_back_delete() and
ldbm_back_modify() code lock the target entry in the cache. If a bepreop
then attempts to operate on the same entry and acquire the lock on the
entry, deadlock will occur.
The modrdn code does not acquire the cache lock on the target entries
before calling the bepreops. The modify and delete code does not acquire
the cache lock on the target entries before calling the bepostops.
I tried unlocking the target entry before calling the bepreops, then locking
the entry just after. This causes the problem to disappear, but I do not
know if this will lead to race conditions. The modrdn has been working this
way forever, and there are no known race conditions with that code.
I think the most robust fix for this issue would be to introduce some sort
of semaphore instead of a simple mutex on the cached entry. Then
cache_lock_entry would look something like this:
if entry->sem == 0
entry->sem++ /* acquire entry */
entry->locking_thread = this_thread
else if entry->locking_thread == this_thread
entry->sem++ /* increment count on this entry */
else
wait_for_sem(entry->sem) /* wait until released */
and cache_unlock_entry would look something like this:
entry->sem--;
if entry->sem == 0
entry->locking_thread = 0
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index 98374ee..3ede0f3 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -178,6 +178,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
/* Don't call pre-op for Tombstone entries */
if (!delete_tombstone_entry)
{
+ int rc = 0;
/*
* Some present state information is passed through the PBlock to the
* backend pre-op plugin. To ensure a consistent snapshot of this state
@@ -191,7 +192,12 @@ ldbm_back_delete( Slapi_PBlock *pb )
goto error_return;
}
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
- if(plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_DELETE_FN)==-1)
+ /* have to unlock the entry here, in case the bepreop attempts
+ to modify the same entry == deadlock */
+ cache_unlock_entry( &inst->inst_cache, e );
+ rc = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_DELETE_FN);
+ cache_lock_entry( &inst->inst_cache, e );
+ if (rc == -1)
{
/*
* Plugin indicated some kind of failure,
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index cf41a64..a368f1c 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -294,7 +294,11 @@ ldbm_back_modify( Slapi_PBlock *pb )
/* ec is the entry that our bepreop should get to mess with */
slapi_pblock_set( pb, SLAPI_MODIFY_EXISTING_ENTRY, ec->ep_entry );
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
+ /* have to unlock the entry here, in case the bepreop attempts
+ to modify the same entry == deadlock */
+ cache_unlock_entry( &inst->inst_cache, e );
plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_MODIFY_FN);
+ cache_lock_entry( &inst->inst_cache, e );
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
/* The Plugin may have messed about with some of the PBlock parameters... ie. mods */
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
index a3f1929..6d0a440 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -1008,6 +1008,7 @@ common_return:
CACHE_RETURN( &inst->inst_cache, &ec );
}
+ moddn_unlock_and_return_entries(be,&e,&existingentry);
/*
* The bepostop is called even if the operation fails.
*/
@@ -1021,7 +1022,6 @@ common_return:
slapi_mods_done(&smods_operation_wsi);
slapi_mods_done(&smods_generated);
slapi_mods_done(&smods_generated_wsi);
- moddn_unlock_and_return_entries(be,&e,&existingentry);
slapi_ch_free((void**)&child_entries);
slapi_ch_free((void**)&child_dns);
if (ldap_result_matcheddn && 0 != strcmp(ldap_result_matcheddn, "NULL"))
14 years
Branch 'Directory_Server_8_2_Branch' - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/modrdn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2e7f9732cdc84a4b2d458aae4bc09f8de7b59a73
Author: Endi S. Dewata <edewata(a)redhat.com>
Date: Wed Mar 17 16:05:53 2010 -0500
Bug 573375 - MODRDN operation not logged
https://bugzilla.redhat.com/show_bug.cgi?id=573375
Resolves: bug 573375
Bug Description: MODRDN operation not logged
Fix Description: The slapi_log_access() should be invoked using
LDAP_DEBUG_STATS, LDAP_DEBUG_STATS2, or LDAP_DEBUG_ARGS level.
diff --git a/ldap/servers/slapd/modrdn.c b/ldap/servers/slapd/modrdn.c
index 38d1300..dc953f7 100644
--- a/ldap/servers/slapd/modrdn.c
+++ b/ldap/servers/slapd/modrdn.c
@@ -352,7 +352,7 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args)
{
if ( !internal_op )
{
- slapi_log_access(SLAPI_LOG_ARGS,
+ slapi_log_access(LDAP_DEBUG_STATS,
"conn=%" NSPRIu64 " op=%d MODRDN dn=\"%s\" newrdn=\"%s\" newsuperior=\"%s\"\n",
pb->pb_conn->c_connid,
pb->pb_op->o_opid,
@@ -362,7 +362,7 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args)
}
else
{
- slapi_log_access(SLAPI_LOG_ARGS,
+ slapi_log_access(LDAP_DEBUG_ARGS,
"conn=%s op=%d MODRDN dn=\"%s\" newrdn=\"%s\" newsuperior=\"%s\"\n",
LOG_INTERNAL_OP_CON_ID,
LOG_INTERNAL_OP_OP_ID,
14 years
configure configure.ac m4/db.m4 m4/fhs.m4 m4/icu.m4 m4/kerberos.m4 m4/mozldap.m4 m4/netsnmp.m4 m4/nspr.m4 m4/nss.m4 m4/openldap.m4 m4/pcre.m4 m4/sasl.m4 m4/selinux.m4 m4/svrcore.m4
by Richard Allen Megginson
configure | 396 ++++++++++++++++++++++++++++++++++-----------------------
configure.ac | 2
m4/db.m4 | 21 +--
m4/fhs.m4 | 4
m4/icu.m4 | 25 ++-
m4/kerberos.m4 | 4
m4/mozldap.m4 | 32 +++-
m4/netsnmp.m4 | 15 +-
m4/nspr.m4 | 17 +-
m4/nss.m4 | 17 +-
m4/openldap.m4 | 16 +-
m4/pcre.m4 | 33 ++--
m4/sasl.m4 | 25 +--
m4/selinux.m4 | 16 +-
m4/svrcore.m4 | 41 +++--
15 files changed, 397 insertions(+), 267 deletions(-)
New commits:
commit 682529e7f8391744615b40a14852efd317936109
Author: root <root(a)buildsamba01.idm.lab.bos.redhat.com>
Date: Fri Mar 19 19:25:48 2010 -0500
Bug 480787 - Autoconf parameter --with and --without
https://bugzilla.redhat.com/show_bug.cgi?id=480787
Resolves: bug 480787
Bug Description: Autoconf parameter --with and --without
Fix Description: The configure script has been modified
such that the --with-XXX and --without-XXX switches will
work as --with-XXX=yes and --with-XXX=no, respectively.
If the package is required and none of the switches are
specified, it will default to "yes".
The code that detects LDAPSDK and OpenLDAP conflicts has
been updated. The help messages have been cleaned up.
Reviewed by: rmeggins (and pushed by)
diff --git a/configure b/configure
index 08774f0..957f2ea 100755
--- a/configure
+++ b/configure
@@ -1070,8 +1070,8 @@ Optional Packages:
both]
--with-tags[=TAGS]
include additional configurations [automatic]
- --with-fhs Use FHS layout
- --with-fhs-opt Use FHS optional layout
+ --with-fhs Use FHS layout
+ --with-fhs-opt Use FHS optional layout
--with-instconfigdir=/path
Base directory for instance specific writable
configuration directories (default
@@ -1079,37 +1079,48 @@ Optional Packages:
--with-initddir=/path Absolute path (not relative like some of the other
options) that should contain the SysV init scripts
(default '$(sysconfdir)/rc.d')
- --with-nspr=PATH Netscape Portable Runtime (NSPR) directory
- --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory
- --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory
- --with-nss=PATH Network Security Services (NSS) directory
- --with-nss-inc=PATH Network Security Services (NSS) include directory
- --with-nss-lib=PATH Network Security Services (NSS) library directory
- --with-openldap=PATH Use OpenLDAP - optional PATH is path to OpenLDAP SDK
- --with-openldap-inc=PATH OpenLDAP SDK include directory
- --with-openldap-lib=PATH OpenLDAP SDK library directory
- --with-openldap-bin=PATH OpenLDAP SDK binary directory
- --with-ldapsdk=PATH Mozilla LDAP SDK directory
- --with-ldapsdk-inc=PATH Mozilla LDAP SDK include directory
- --with-ldapsdk-lib=PATH Mozilla LDAP SDK library directory
- --with-ldapsdk-bin=PATH Mozilla LDAP SDK binary directory
- --with-db=PATH Berkeley DB directory
- --with-db-inc=PATH Berkeley DB include file directory
- --with-db-lib=PATH Berkeley DB library directory
- --with-sasl=PATH Use sasl from supplied path
- --with-sasl-inc=PATH SASL include file directory
- --with-sasl-lib=PATH SASL library directory
- --with-svrcore[=PATH] Use system installed svrcore - optional path for svrcore
- --with-svrcore-inc=PATH SVRCORE include file directory
- --with-svrcore-lib=PATH SVRCORE library directory
- --with-icu=PATH ICU directory
+ --with-nspr[=PATH]
+ Netscape Portable Runtime (NSPR) directory
+ --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include directory
+ --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory
+ --with-nss[=PATH] Network Security Services (NSS) directory
+ --with-nss-inc=PATH Network Security Services (NSS) include directory
+ --with-nss-lib=PATH Network Security Services (NSS) library directory
+ --with-openldap[=PATH]
+ Use OpenLDAP - optional PATH is path to OpenLDAP SDK
+ --with-openldap-inc=PATH
+ OpenLDAP SDK include directory
+ --with-openldap-lib=PATH
+ OpenLDAP SDK library directory
+ --with-openldap-bin=PATH
+ OpenLDAP SDK binary directory
+ --with-ldapsdk[=PATH]
+ Mozilla LDAP SDK directory
+ --with-ldapsdk-inc=PATH Mozilla LDAP SDK include directory
+ --with-ldapsdk-lib=PATH Mozilla LDAP SDK library directory
+ --with-ldapsdk-bin=PATH Mozilla LDAP SDK binary directory
+ --with-db[=PATH] Berkeley DB directory
+ --with-db-inc=PATH Berkeley DB include file directory
+ --with-db-lib=PATH Berkeley DB library directory
+ --with-sasl[=PATH]
+ Use SASL from supplied path
+ --with-sasl-inc=PATH SASL include file directory
+ --with-sasl-lib=PATH SASL library directory
+ --with-svrcore[=PATH]
+ Use system installed SVRCORE - optional path for
+ SVRCORE
+ --with-svrcore-inc=PATH SVRCORE include file directory
+ --with-svrcore-lib=PATH SVRCORE library directory
+ --with-icu[=PATH] ICU directory
--with-icu-inc=PATH ICU include directory
--with-icu-lib=PATH ICU library directory
--with-icu-bin=PATH ICU binary directory
- --with-netsnmp=PATH Net-SNMP directory
- --with-netsnmp-inc=PATH Net-SNMP include directory
- --with-netsnmp-lib=PATH Net-SNMP library directory
- --with-kerberos=PATH Use the kerberos API in the server directly - allows
+ --with-netsnmp[=PATH]
+ Net-SNMP directory
+ --with-netsnmp-inc=PATH Net-SNMP include directory
+ --with-netsnmp-lib=PATH Net-SNMP library directory
+ --with-kerberos[=PATH]
+ Use the kerberos API in the server directly - allows
the server to authenticate directly with a keytab -
otherwise, SASL/GSSAPI auth depends on underlying
SASL libraries and external kinit with a keytab - if
@@ -1128,8 +1139,9 @@ Optional Packages:
Allows you to explicitly set the directory
containing the kerberos libraries - implies use of
kerberos
- --with-pcre=PATH Perl Compatible Regular Expression directory
- --with-selinux Build SELinux policy
+ --with-pcre[=PATH]
+ Perl Compatible Regular Expression directory
+ --with-selinux Build SELinux policy
Some influential environment variables:
CXX C++ compiler command
@@ -4392,7 +4404,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4395 "configure"' > conftest.$ac_ext
+ echo '#line 4407 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5527,7 +5539,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:5530:" \
+echo "$as_me:5542:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6590,11 +6602,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6593: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6605: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6597: \$? = $ac_status" >&5
+ echo "$as_me:6609: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6858,11 +6870,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6861: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6873: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6865: \$? = $ac_status" >&5
+ echo "$as_me:6877: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6962,11 +6974,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6965: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6977: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6969: \$? = $ac_status" >&5
+ echo "$as_me:6981: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8431,7 +8443,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8434 "configure"' > conftest.$ac_ext
+ echo '#line 8446 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9328,7 +9340,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9331 "configure"
+#line 9343 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9428,7 +9440,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9431 "configure"
+#line 9443 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11771,11 +11783,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11774: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11786: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11778: \$? = $ac_status" >&5
+ echo "$as_me:11790: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11875,11 +11887,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11878: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11890: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11882: \$? = $ac_status" >&5
+ echo "$as_me:11894: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12411,7 +12423,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12414 "configure"' > conftest.$ac_ext
+ echo '#line 12426 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13469,11 +13481,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13472: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13484: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13476: \$? = $ac_status" >&5
+ echo "$as_me:13488: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13573,11 +13585,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13576: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13588: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13580: \$? = $ac_status" >&5
+ echo "$as_me:13592: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15022,7 +15034,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 15025 "configure"' > conftest.$ac_ext
+ echo '#line 15037 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -15800,11 +15812,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15803: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15815: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15807: \$? = $ac_status" >&5
+ echo "$as_me:15819: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16068,11 +16080,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16071: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16083: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16075: \$? = $ac_status" >&5
+ echo "$as_me:16087: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16172,11 +16184,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16175: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16187: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16179: \$? = $ac_status" >&5
+ echo "$as_me:16191: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17641,7 +17653,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 17644 "configure"' > conftest.$ac_ext
+ echo '#line 17656 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -23984,7 +23996,18 @@ echo $ECHO_N "checking for --with-nspr... $ECHO_C" >&6
if test "${with_nspr+set}" = set; then
withval="$with_nspr"
- if test -e "$withval"/include/nspr.h -a -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ elif test "$withval" = "no"
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: NSPR is required." >&5
+echo "$as_me: error: NSPR is required." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test -e "$withval"/include/nspr.h -a -d "$withval"/lib
then
echo "$as_me:$LINENO: result: using $withval" >&5
echo "${ECHO_T}using $withval" >&6
@@ -24000,8 +24023,8 @@ echo "$as_me: error: $withval not found" >&2;}
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
# check for --with-nspr-inc
@@ -24152,7 +24175,18 @@ echo $ECHO_N "checking for --with-nss... $ECHO_C" >&6
if test "${with_nss+set}" = set; then
withval="$with_nss"
- if test -e "$withval"/include/nss.h -a -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ elif test "$withval" = "no"
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: NSS is required." >&5
+echo "$as_me: error: NSS is required." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test -e "$withval"/include/nss.h -a -d "$withval"/lib
then
echo "$as_me:$LINENO: result: using $withval" >&5
echo "${ECHO_T}using $withval" >&6
@@ -24168,8 +24202,8 @@ echo "$as_me: error: $withval not found" >&2;}
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
# check for --with-nss-inc
@@ -24289,8 +24323,6 @@ echo "$as_me: error: NSS not found, specify with --with-nss." >&2;}
fi
fi
-# default to Mozilla LDAP C SDK - override with --with-openldap
-with_ldapsdk=yes
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
@@ -24326,6 +24358,10 @@ if test "${with_openldap+set}" = set; then
then
echo "$as_me:$LINENO: result: using system OpenLDAP" >&5
echo "${ECHO_T}using system OpenLDAP" >&6
+ elif test "$withval" = no
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib
then
echo "$as_me:$LINENO: result: using $withval" >&5
@@ -24431,8 +24467,8 @@ fi;
# if OPENLDAP is not found yet, try pkg-config
-if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir" -o -z "$openldap_bindir"; then
- if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths
+if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths
+ if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir" -o -z "$openldap_bindir"; then
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -24871,7 +24907,6 @@ cat >>confdefs.h <<\_ACEOF
#define USE_OPENLDAP 1
_ACEOF
- with_ldapsdk=no # using openldap not mozldap
fi
# BEGIN COPYRIGHT BLOCK
@@ -24907,8 +24942,12 @@ if test "${with_ldapsdk+set}" = set; then
if test "$withval" = yes
then
- echo "$as_me:$LINENO: result: using system MozLDAP" >&5
-echo "${ECHO_T}using system MozLDAP" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ elif test "$withval" = no
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib
then
echo "$as_me:$LINENO: result: using $withval" >&5
@@ -24926,9 +24965,31 @@ echo "$as_me: error: $withval not found" >&2;}
{ (exit 1); exit 1; }; }
fi
+ if test "$with_ldapsdk" = yes -a "$with_openldap" = yes
+ then
+ { { echo "$as_me:$LINENO: error: Cannot use both LDAPSDK and OpenLDAP." >&5
+echo "$as_me: error: Cannot use both LDAPSDK and OpenLDAP." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test "$with_ldapsdk" != yes -a "$with_openldap" != yes
+ then
+ { { echo "$as_me:$LINENO: error: Either LDAPSDK or OpenLDAP must be used." >&5
+echo "$as_me: error: Either LDAPSDK or OpenLDAP must be used." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
else
- echo "$as_me:$LINENO: result: no" >&5
+
+ if test "$with_openldap" = yes
+ then
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ with_ldapsdk=yes
+ fi
+
fi;
# check for --with-ldapsdk-inc
@@ -25203,16 +25264,12 @@ if test "${with_db+set}" = set; then
if test "$withval" = "yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- if test -f "/usr/include/db.h"; then
- db_incdir="/usr/include"
- db_inc="-I/usr/include"
- db_lib='-L$(libdir)'
- db_libdir='$(libdir)'
- else
- { { echo "$as_me:$LINENO: error: db.h not found" >&5
-echo "$as_me: error: db.h not found" >&2;}
+ elif test "$withval" = "no"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: db is required." >&5
+echo "$as_me: error: db is required." >&2;}
{ (exit 1); exit 1; }; }
- fi
elif test -d "$withval"/include -a -d "$withval"/lib; then
echo "$as_me:$LINENO: result: using $withval" >&5
echo "${ECHO_T}using $withval" >&6
@@ -25234,8 +25291,8 @@ echo "$as_me: error: $withval not found" >&2;}
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
# check for --with-db-inc
@@ -25315,6 +25372,7 @@ echo "$as_me: error: db not found, specify with --with-db." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
+
db_ver_maj=`grep DB_VERSION_MAJOR $db_incdir/db.h | awk '{print $3}'`
db_ver_min=`grep DB_VERSION_MINOR $db_incdir/db.h | awk '{print $3}'`
db_ver_pat=`grep DB_VERSION_PATCH $db_incdir/db.h | awk '{print $3}'`
@@ -25433,8 +25491,8 @@ fi
# -*- tab-width: 4; -*-
# Configure paths for SASL
-{ echo "$as_me:$LINENO: checking for sasl..." >&5
-echo "$as_me: checking for sasl..." >&6;}
+{ echo "$as_me:$LINENO: checking for SASL..." >&5
+echo "$as_me: checking for SASL..." >&6;}
echo "$as_me:$LINENO: checking for --with-sasl" >&5
echo $ECHO_N "checking for --with-sasl... $ECHO_C" >&6
@@ -25447,15 +25505,12 @@ if test "${with_sasl+set}" = set; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- if test -f /usr/include/sasl/sasl.h; then
- sasl_inc="-I/usr/include/sasl"
- elif test -f /usr/include/sasl.h; then
- sasl_inc="-I/usr/include"
- else
- { { echo "$as_me:$LINENO: error: sasl.h not found" >&5
-echo "$as_me: error: sasl.h not found" >&2;}
+ elif test "$withval" = "no"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: SASL is required." >&5
+echo "$as_me: error: SASL is required." >&2;}
{ (exit 1); exit 1; }; }
- fi
elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then
echo "$as_me:$LINENO: result: using $withval" >&5
@@ -25476,14 +25531,14 @@ echo "$as_me: error: sasl.h not found" >&2;}
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- { { echo "$as_me:$LINENO: error: sasl not found in $withval" >&5
-echo "$as_me: error: sasl not found in $withval" >&2;}
+ { { echo "$as_me:$LINENO: error: SASL not found in $withval" >&5
+echo "$as_me: error: SASL not found in $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
echo "$as_me:$LINENO: checking for --with-sasl-inc" >&5
@@ -25547,8 +25602,8 @@ echo "${ECHO_T}using /usr/include/sasl.h" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- { { echo "$as_me:$LINENO: error: sasl not found, specify with --with-sasl." >&5
-echo "$as_me: error: sasl not found, specify with --with-sasl." >&2;}
+ { { echo "$as_me:$LINENO: error: SASL not found, specify with --with-sasl." >&5
+echo "$as_me: error: SASL not found, specify with --with-sasl." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -25575,8 +25630,8 @@ fi
#
# Configure paths for SVRCORE
-{ echo "$as_me:$LINENO: checking for svrcore..." >&5
-echo "$as_me: checking for svrcore..." >&6;}
+{ echo "$as_me:$LINENO: checking for SVRCORE..." >&5
+echo "$as_me: checking for SVRCORE..." >&6;}
echo "$as_me:$LINENO: checking for --with-svrcore" >&5
echo $ECHO_N "checking for --with-svrcore... $ECHO_C" >&6
@@ -25589,13 +25644,12 @@ if test "${with_svrcore+set}" = set; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- if test -f /usr/include/svrcore.h; then
- svrcore_inc="-I/usr/include"
- else
- { { echo "$as_me:$LINENO: error: svrcore.h not found" >&5
-echo "$as_me: error: svrcore.h not found" >&2;}
+ elif test "$withval" = "no"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: SVRCORE is required." >&5
+echo "$as_me: error: SVRCORE is required." >&2;}
{ (exit 1); exit 1; }; }
- fi
elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then
echo "$as_me:$LINENO: result: using $withval" >&5
@@ -25613,14 +25667,14 @@ echo "$as_me: error: svrcore.h not found" >&2;}
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- { { echo "$as_me:$LINENO: error: svrcore not found in $withval" >&5
-echo "$as_me: error: svrcore not found in $withval" >&2;}
+ { { echo "$as_me:$LINENO: error: SVRCORE not found in $withval" >&5
+echo "$as_me: error: SVRCORE not found in $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
echo "$as_me:$LINENO: checking for --with-svrcore-inc" >&5
@@ -25709,8 +25763,8 @@ else
echo "${ECHO_T}no" >&6
fi
- echo "$as_me:$LINENO: checking for svrcore with pkg-config" >&5
-echo $ECHO_N "checking for svrcore with pkg-config... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for SVRCORE with pkg-config" >&5
+echo $ECHO_N "checking for SVRCORE with pkg-config... $ECHO_C" >&6
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists svrcore; then
svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore`
@@ -25940,8 +25994,19 @@ fi
CPPFLAGS="$save_cppflags"
fi
if test -z "$havesvrcore" ; then
- { { echo "$as_me:$LINENO: error: svrcore not found, specify with --with-svrcore." >&5
-echo "$as_me: error: svrcore not found, specify with --with-svrcore." >&2;}
+ { { echo "$as_me:$LINENO: error: SVRCORE not found, specify with --with-svrcore." >&5
+echo "$as_me: error: SVRCORE not found, specify with --with-svrcore." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then
+ if test -f /usr/include/svrcore.h; then
+ svrcore_inc="-I/usr/include"
+ svrcore_lib="-L/usr/lib"
+ else
+ { { echo "$as_me:$LINENO: error: SVRCORE not found, specify with --with-svrcore." >&5
+echo "$as_me: error: SVRCORE not found, specify with --with-svrcore." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -25977,24 +26042,35 @@ echo $ECHO_N "checking for --with-icu... $ECHO_C" >&6
if test "${with_icu+set}" = set; then
withval="$with_icu"
- if test -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ elif test "$withval" = "no"
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: ICU is required." >&5
+echo "$as_me: error: ICU is required." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test -d "$withval"/lib
then
echo "$as_me:$LINENO: result: using $withval" >&5
echo "${ECHO_T}using $withval" >&6
ICUDIR=$withval
icu_lib="-L$ICUDIR/lib"
+ icu_inc="-I$withval/include"
+ icu_bin="$withval/bin"
else
echo
{ { echo "$as_me:$LINENO: error: $withval not found" >&5
echo "$as_me: error: $withval not found" >&2;}
{ (exit 1); exit 1; }; }
fi
- icu_inc="-I$withval/include"
- icu_bin="$withval/bin"
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
# check for --with-icu-inc
@@ -26075,8 +26151,6 @@ fi;
# last resort
if test -z "$icu_lib"; then
- echo "$as_me:$LINENO: checking for icu with icu-config" >&5
-echo $ECHO_N "checking for icu with icu-config... $ECHO_C" >&6
# Extract the first word of "icu-config", so it can be a program name with args.
set dummy icu-config; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -26116,6 +26190,8 @@ else
echo "${ECHO_T}no" >&6
fi
+ echo "$as_me:$LINENO: checking for icu with icu-config" >&5
+echo $ECHO_N "checking for icu with icu-config... $ECHO_C" >&6
if test -n "$ICU_CONFIG"; then
icu_lib=`$ICU_CONFIG --ldflags-searchpath`
icu_inc=`$ICU_CONFIG --cppflags-searchpath`
@@ -26159,7 +26235,16 @@ echo $ECHO_N "checking for --with-netsnmp... $ECHO_C" >&6
if test "${with_netsnmp+set}" = set; then
withval="$with_netsnmp"
- if test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include"; then
+ if test "$withval" = "yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ elif test "$withval" = "no"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: Net-SNMP is required." >&5
+echo "$as_me: error: Net-SNMP is required." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include"; then
echo "$as_me:$LINENO: result: using $withval" >&5
echo "${ECHO_T}using $withval" >&6
NETSNMPDIR=$withval
@@ -26183,8 +26268,8 @@ echo "$as_me: error: $withval not found" >&2;}
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
echo "$as_me:$LINENO: checking for --with-netsnmp-inc" >&5
@@ -26331,8 +26416,8 @@ fi
# -*- tab-width: 4; -*-
# Configure paths for Kerberos
-{ echo "$as_me:$LINENO: checking for kerberos..." >&5
-echo "$as_me: checking for kerberos..." >&6;}
+{ echo "$as_me:$LINENO: checking for Kerberos..." >&5
+echo "$as_me: checking for Kerberos..." >&6;}
if test -z "$with_kerberos" ; then
with_kerberos=yes # if not set on cmdline, set default
@@ -27087,8 +27172,8 @@ fi
#
# END COPYRIGHT BLOCK
-{ echo "$as_me:$LINENO: checking for pcre..." >&5
-echo "$as_me: checking for pcre..." >&6;}
+{ echo "$as_me:$LINENO: checking for PCRE..." >&5
+echo "$as_me: checking for PCRE..." >&6;}
echo "$as_me:$LINENO: checking for --with-pcre" >&5
echo $ECHO_N "checking for --with-pcre... $ECHO_C" >&6
@@ -27100,21 +27185,12 @@ if test "${with_pcre+set}" = set; then
if test "$withval" = "yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- if test -f "/usr/include/pcre/pcre.h"; then
- pcre_incdir="/usr/include/pcre"
- pcre_inc="-I/usr/include/pcre"
- pcre_lib='-L$(libdir)'
- pcre_libdir='$(libdir)'
- elif test -f "/usr/include/pcre.h"; then
- pcre_incdir="/usr/include"
- pcre_inc="-I/usr/include"
- pcre_lib='-L$(libdir)'
- pcre_libdir='$(libdir)'
- else
- { { echo "$as_me:$LINENO: error: pcre.h not found" >&5
-echo "$as_me: error: pcre.h not found" >&2;}
+ elif test "$withval" = "no"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: PCRE is required." >&5
+echo "$as_me: error: PCRE is required." >&2;}
{ (exit 1); exit 1; }; }
- fi
elif test -d "$withval"/include -a -d "$withval"/lib; then
echo "$as_me:$LINENO: result: using $withval" >&5
echo "${ECHO_T}using $withval" >&6
@@ -27136,8 +27212,8 @@ echo "$as_me: error: $withval not found" >&2;}
fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi;
#
@@ -27208,7 +27284,14 @@ fi
if test -z "$pcre_inc"; then
echo "$as_me:$LINENO: checking for pcre.h" >&5
echo $ECHO_N "checking for pcre.h... $ECHO_C" >&6
- if test -f "/usr/include/pcre.h"; then
+ if test -f "/usr/include/pcre/pcre.h"; then
+ echo "$as_me:$LINENO: result: using /usr/include/pcre/pcre.h" >&5
+echo "${ECHO_T}using /usr/include/pcre/pcre.h" >&6
+ pcre_incdir="/usr/include/pcre"
+ pcre_inc="-I/usr/include/pcre"
+ pcre_lib='-L$(libdir)'
+ pcre_libdir='$(libdir)'
+ elif test -f "/usr/include/pcre.h"; then
echo "$as_me:$LINENO: result: using /usr/include/pcre.h" >&5
echo "${ECHO_T}using /usr/include/pcre.h" >&6
pcre_incdir="/usr/include"
@@ -27218,8 +27301,8 @@ echo "${ECHO_T}using /usr/include/pcre.h" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- { { echo "$as_me:$LINENO: error: pcre not found, specify with --with-pcre." >&5
-echo "$as_me: error: pcre not found, specify with --with-pcre." >&2;}
+ { { echo "$as_me:$LINENO: error: PCRE not found, specify with --with-pcre." >&5
+echo "$as_me: error: PCRE not found, specify with --with-pcre." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -27255,14 +27338,19 @@ echo $ECHO_N "checking for --with-selinux... $ECHO_C" >&6
if test "${with_selinux+set}" = set; then
withval="$with_selinux"
- with_selinux=yes
- echo "$as_me:$LINENO: result: yes" >&5
+ if test "$withval" = "no"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ with_selinux=yes
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- if test ! -f "/usr/share/selinux/devel/Makefile"; then
- { { echo "$as_me:$LINENO: error: SELinux development tools (selinux-policy) not found" >&5
+ if test ! -f "/usr/share/selinux/devel/Makefile"; then
+ { { echo "$as_me:$LINENO: error: SELinux development tools (selinux-policy) not found" >&5
echo "$as_me: error: SELinux development tools (selinux-policy) not found" >&2;}
{ (exit 1); exit 1; }; }
+ fi
fi
else
diff --git a/configure.ac b/configure.ac
index 68a6d80..cd4ab80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -466,8 +466,6 @@ AM_CONDITIONAL(SOLARIS,test "$platform" = "solaris")
# Check for library dependencies
m4_include(m4/nspr.m4)
m4_include(m4/nss.m4)
-# default to Mozilla LDAP C SDK - override with --with-openldap
-with_ldapsdk=yes
m4_include(m4/openldap.m4)
m4_include(m4/mozldap.m4)
m4_include(m4/db.m4)
diff --git a/m4/db.m4 b/m4/db.m4
index 1cde57d..7b300f4 100644
--- a/m4/db.m4
+++ b/m4/db.m4
@@ -22,19 +22,13 @@ AC_CHECKING(for db)
dnl - check for --with-db
AC_MSG_CHECKING(for --with-db)
-AC_ARG_WITH(db, [ --with-db=PATH Berkeley DB directory],
+AC_ARG_WITH(db, AS_HELP_STRING([--with-db@<:@=PATH@:>@],[Berkeley DB directory]),
[
if test "$withval" = "yes"; then
AC_MSG_RESULT(yes)
- dnl - check in system locations
- if test -f "/usr/include/db.h"; then
- db_incdir="/usr/include"
- db_inc="-I/usr/include"
- db_lib='-L$(libdir)'
- db_libdir='$(libdir)'
- else
- AC_MSG_ERROR([db.h not found])
- fi
+ elif test "$withval" = "no"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([db is required.])
elif test -d "$withval"/include -a -d "$withval"/lib; then
AC_MSG_RESULT([using $withval])
dnl - check the user provided location
@@ -51,12 +45,12 @@ AC_ARG_WITH(db, [ --with-db=PATH Berkeley DB directory],
AC_MSG_ERROR([$withval not found])
fi
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
dnl default path for the db tools (see [210947] for more details)
# check for --with-db-inc
AC_MSG_CHECKING(for --with-db-inc)
-AC_ARG_WITH(db-inc, [ --with-db-inc=PATH Berkeley DB include file directory],
+AC_ARG_WITH(db-inc, AS_HELP_STRING([--with-db-inc=PATH],[Berkeley DB include file directory]),
[
if test -e "$withval"/db.h
then
@@ -72,7 +66,7 @@ AC_MSG_RESULT(no))
# check for --with-db-lib
AC_MSG_CHECKING(for --with-db-lib)
-AC_ARG_WITH(db-lib, [ --with-db-lib=PATH Berkeley DB library directory],
+AC_ARG_WITH(db-lib, AS_HELP_STRING([--with-db-lib=PATH],[Berkeley DB library directory]),
[
if test -d "$withval"
then
@@ -106,6 +100,7 @@ if test -z "$db_inc"; then
AC_MSG_ERROR([db not found, specify with --with-db.])
fi
fi
+
dnl figure out which version of db we're using from the header file
db_ver_maj=`grep DB_VERSION_MAJOR $db_incdir/db.h | awk '{print $3}'`
db_ver_min=`grep DB_VERSION_MINOR $db_incdir/db.h | awk '{print $3}'`
diff --git a/m4/fhs.m4 b/m4/fhs.m4
index 479a76d..d42c304 100644
--- a/m4/fhs.m4
+++ b/m4/fhs.m4
@@ -22,7 +22,7 @@ AC_CHECKING(for FHS)
# check for --with-fhs
AC_MSG_CHECKING(for --with-fhs)
-AC_ARG_WITH(fhs, [ --with-fhs Use FHS layout],
+AC_ARG_WITH(fhs, AS_HELP_STRING([--with-fhs],[Use FHS layout]),
[
with_fhs=yes
AC_MSG_RESULT(yes)
@@ -35,7 +35,7 @@ fi
# check for --with-fhs-opt
AC_MSG_CHECKING(for --with-fhs-opt)
-AC_ARG_WITH(fhs-opt, [ --with-fhs-opt Use FHS optional layout],
+AC_ARG_WITH(fhs-opt, AS_HELP_STRING([--with-fhs-opt],[Use FHS optional layout]),
[
with_fhs_opt=yes
AC_MSG_RESULT(yes)
diff --git a/m4/icu.m4 b/m4/icu.m4
index f36ef93..a901293 100644
--- a/m4/icu.m4
+++ b/m4/icu.m4
@@ -22,25 +22,32 @@ AC_CHECKING(for LIBICU)
# check for --with-icu
AC_MSG_CHECKING(for --with-icu)
-AC_ARG_WITH(icu, [ --with-icu=PATH ICU directory],
+AC_ARG_WITH(icu, AS_HELP_STRING([--with-icu@<:@=PATH@:>@],[ICU directory]),
[
- if test -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ AC_MSG_RESULT(yes)
+ elif test "$withval" = "no"
+ then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([ICU is required.])
+ elif test -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
ICUDIR=$withval
icu_lib="-L$ICUDIR/lib"
+ icu_inc="-I$withval/include"
+ icu_bin="$withval/bin"
else
echo
AC_MSG_ERROR([$withval not found])
fi
- icu_inc="-I$withval/include"
- icu_bin="$withval/bin"
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
# check for --with-icu-inc
AC_MSG_CHECKING(for --with-icu-inc)
-AC_ARG_WITH(icu-inc, [ --with-icu-inc=PATH ICU include directory],
+AC_ARG_WITH(icu-inc, AS_HELP_STRING([--with-icu-inc=PATH],[ICU include directory]),
[
if test -d "$withval"
then
@@ -55,7 +62,7 @@ AC_MSG_RESULT(no))
# check for --with-icu-lib
AC_MSG_CHECKING(for --with-icu-lib)
-AC_ARG_WITH(icu-lib, [ --with-icu-lib=PATH ICU library directory],
+AC_ARG_WITH(icu-lib, AS_HELP_STRING([--with-icu-lib=PATH],[ICU library directory]),
[
if test -d "$withval"
then
@@ -70,7 +77,7 @@ AC_MSG_RESULT(no))
# check for --with-icu-bin
AC_MSG_CHECKING(for --with-icu-bin)
-AC_ARG_WITH(icu-bin, [ --with-icu-bin=PATH ICU binary directory],
+AC_ARG_WITH(icu-bin, AS_HELP_STRING([--with-icu-bin=PATH],[ICU binary directory]),
[
if test -d "$withval"
then
@@ -86,8 +93,8 @@ AC_MSG_RESULT(no))
# last resort
if test -z "$icu_lib"; then
- AC_MSG_CHECKING(for icu with icu-config)
AC_PATH_PROG(ICU_CONFIG, icu-config)
+ AC_MSG_CHECKING(for icu with icu-config)
if test -n "$ICU_CONFIG"; then
icu_lib=`$ICU_CONFIG --ldflags-searchpath`
icu_inc=`$ICU_CONFIG --cppflags-searchpath`
diff --git a/m4/kerberos.m4 b/m4/kerberos.m4
index 2623414..0a84e96 100644
--- a/m4/kerberos.m4
+++ b/m4/kerberos.m4
@@ -26,7 +26,7 @@ dnl = authentication (replication, chaining, etc.)
dnl = This allows us to authenticate using a keytab without
dnl = having to call kinit outside the process
dnl ========================================================
-AC_CHECKING(for kerberos)
+AC_CHECKING(for Kerberos)
if test -z "$with_kerberos" ; then
with_kerberos=yes # if not set on cmdline, set default
@@ -34,7 +34,7 @@ fi
AC_MSG_CHECKING(for --with-kerberos)
AC_ARG_WITH(kerberos,
- AS_HELP_STRING([--with-kerberos[=PATH]], [Use the kerberos API in the server directly - allows the server to authenticate directly with a keytab - otherwise, SASL/GSSAPI auth depends on underlying SASL libraries and external kinit with a keytab - if PATH is not specified, look for kerberos in the system locations. This will attempt to use krb5-config from the PATH to find the libs and include dirs - you can specify KRB5_CONFIG_BIN to specify a different filename or absolute path. If krb5-config does not work, this will attempt to look in various system directories]),
+ AS_HELP_STRING([--with-kerberos@<:@=PATH@:>@], [Use the kerberos API in the server directly - allows the server to authenticate directly with a keytab - otherwise, SASL/GSSAPI auth depends on underlying SASL libraries and external kinit with a keytab - if PATH is not specified, look for kerberos in the system locations. This will attempt to use krb5-config from the PATH to find the libs and include dirs - you can specify KRB5_CONFIG_BIN to specify a different filename or absolute path. If krb5-config does not work, this will attempt to look in various system directories]),
[
if test "x$withval" = "xyes"; then
AC_MSG_RESULT(yes)
diff --git a/m4/mozldap.m4 b/m4/mozldap.m4
index 475e868..51e151d 100644
--- a/m4/mozldap.m4
+++ b/m4/mozldap.m4
@@ -22,11 +22,14 @@ AC_CHECKING(for Mozilla LDAPSDK)
# check for --with-ldapsdk
AC_MSG_CHECKING(for --with-ldapsdk)
-AC_ARG_WITH(ldapsdk, [ --with-ldapsdk=PATH Mozilla LDAP SDK directory],
+AC_ARG_WITH(ldapsdk, AS_HELP_STRING([--with-ldapsdk@<:@=PATH@:>@],[Mozilla LDAP SDK directory]),
[
if test "$withval" = yes
then
- AC_MSG_RESULT([using system MozLDAP])
+ AC_MSG_RESULT(yes)
+ elif test "$withval" = no
+ then
+ AC_MSG_RESULT(no)
elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
@@ -40,12 +43,29 @@ AC_ARG_WITH(ldapsdk, [ --with-ldapsdk=PATH Mozilla LDAP SDK directory],
echo
AC_MSG_ERROR([$withval not found])
fi
+
+ if test "$with_ldapsdk" = yes -a "$with_openldap" = yes
+ then
+ AC_MSG_ERROR([Cannot use both LDAPSDK and OpenLDAP.])
+ fi
+ if test "$with_ldapsdk" != yes -a "$with_openldap" != yes
+ then
+ AC_MSG_ERROR([Either LDAPSDK or OpenLDAP must be used.])
+ fi
],
-AC_MSG_RESULT(no))
+[
+ if test "$with_openldap" = yes
+ then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ with_ldapsdk=yes
+ fi
+])
# check for --with-ldapsdk-inc
AC_MSG_CHECKING(for --with-ldapsdk-inc)
-AC_ARG_WITH(ldapsdk-inc, [ --with-ldapsdk-inc=PATH Mozilla LDAP SDK include directory],
+AC_ARG_WITH(ldapsdk-inc, AS_HELP_STRING([--with-ldapsdk-inc=PATH],[Mozilla LDAP SDK include directory]),
[
if test -e "$withval"/ldap.h
then
@@ -61,7 +81,7 @@ AC_MSG_RESULT(no))
# check for --with-ldapsdk-lib
AC_MSG_CHECKING(for --with-ldapsdk-lib)
-AC_ARG_WITH(ldapsdk-lib, [ --with-ldapsdk-lib=PATH Mozilla LDAP SDK library directory],
+AC_ARG_WITH(ldapsdk-lib, AS_HELP_STRING([--with-ldapsdk-lib=PATH],[Mozilla LDAP SDK library directory]),
[
if test -d "$withval"
then
@@ -78,7 +98,7 @@ AC_MSG_RESULT(no))
# check for --with-ldapsdk-bin
AC_MSG_CHECKING(for --with-ldapsdk-bin)
-AC_ARG_WITH(ldapsdk-bin, [ --with-ldapsdk-bin=PATH Mozilla LDAP SDK binary directory],
+AC_ARG_WITH(ldapsdk-bin, AS_HELP_STRING([--with-ldapsdk-bin=PATH],[Mozilla LDAP SDK binary directory]),
[
if test -d "$withval"
then
diff --git a/m4/netsnmp.m4 b/m4/netsnmp.m4
index 10fccf8..60ad9c9 100644
--- a/m4/netsnmp.m4
+++ b/m4/netsnmp.m4
@@ -22,9 +22,14 @@ AC_CHECKING(for Net-SNMP)
dnl - check for --with-netsnmp
AC_MSG_CHECKING(for --with-netsnmp)
-AC_ARG_WITH(netsnmp, [ --with-netsnmp=PATH Net-SNMP directory],
+AC_ARG_WITH(netsnmp, AS_HELP_STRING([--with-netsnmp@<:@=PATH@:>@],[Net-SNMP directory]),
[
- if test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include"; then
+ if test "$withval" = "yes"; then
+ AC_MSG_RESULT(yes)
+ elif test "$withval" = "no"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Net-SNMP is required.])
+ elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include"; then
AC_MSG_RESULT([using $withval])
NETSNMPDIR=$withval
@@ -41,11 +46,11 @@ AC_ARG_WITH(netsnmp, [ --with-netsnmp=PATH Net-SNMP directory],
AC_MSG_ERROR([$withval not found])
fi
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
dnl - check for --with-netsnmp-inc
AC_MSG_CHECKING(for --with-netsnmp-inc)
-AC_ARG_WITH(netsnmp-inc, [ --with-netsnmp-inc=PATH Net-SNMP include directory],
+AC_ARG_WITH(netsnmp-inc, AS_HELP_STRING([--with-netsnmp-inc=PATH],[Net-SNMP include directory]),
[
if test -f "$withval/net-snmp/net-snmp-includes.h"; then
AC_MSG_RESULT([using $withval])
@@ -59,7 +64,7 @@ AC_MSG_RESULT(no))
dnl - check for --with-netsnmp-lib
AC_MSG_CHECKING(for --with-netsnmp-lib)
-AC_ARG_WITH(netsnmp-lib, [ --with-netsnmp-lib=PATH Net-SNMP library directory],
+AC_ARG_WITH(netsnmp-lib, AS_HELP_STRING([--with-netsnmp-lib=PATH],[Net-SNMP library directory]),
[
if test -d "$withval"
then
diff --git a/m4/nspr.m4 b/m4/nspr.m4
index e89b9a8..79d21b0 100644
--- a/m4/nspr.m4
+++ b/m4/nspr.m4
@@ -22,9 +22,16 @@ AC_CHECKING(for NSPR)
# check for --with-nspr
AC_MSG_CHECKING(for --with-nspr)
-AC_ARG_WITH(nspr, [ --with-nspr=PATH Netscape Portable Runtime (NSPR) directory],
+AC_ARG_WITH(nspr, AS_HELP_STRING([--with-nspr@<:@=PATH@:>@],[Netscape Portable Runtime (NSPR) directory]),
[
- if test -e "$withval"/include/nspr.h -a -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ AC_MSG_RESULT(yes)
+ elif test "$withval" = "no"
+ then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([NSPR is required.])
+ elif test -e "$withval"/include/nspr.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
NSPRDIR=$withval
@@ -36,11 +43,11 @@ AC_ARG_WITH(nspr, [ --with-nspr=PATH Netscape Portable Runtime (NSPR) di
AC_MSG_ERROR([$withval not found])
fi
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
# check for --with-nspr-inc
AC_MSG_CHECKING(for --with-nspr-inc)
-AC_ARG_WITH(nspr-inc, [ --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory],
+AC_ARG_WITH(nspr-inc, AS_HELP_STRING([--with-nspr-inc=PATH],[Netscape Portable Runtime (NSPR) include directory]),
[
if test -e "$withval"/nspr.h
then
@@ -55,7 +62,7 @@ AC_MSG_RESULT(no))
# check for --with-nspr-lib
AC_MSG_CHECKING(for --with-nspr-lib)
-AC_ARG_WITH(nspr-lib, [ --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory],
+AC_ARG_WITH(nspr-lib, AS_HELP_STRING([--with-nspr-lib=PATH],[Netscape Portable Runtime (NSPR) library directory]),
[
if test -d "$withval"
then
diff --git a/m4/nss.m4 b/m4/nss.m4
index 9d89225..753b003 100644
--- a/m4/nss.m4
+++ b/m4/nss.m4
@@ -22,9 +22,16 @@ AC_CHECKING(for NSS)
# check for --with-nss
AC_MSG_CHECKING(for --with-nss)
-AC_ARG_WITH(nss, [ --with-nss=PATH Network Security Services (NSS) directory],
+AC_ARG_WITH(nss, AS_HELP_STRING([--with-nss@<:@=PATH@:>@],[Network Security Services (NSS) directory]),
[
- if test -e "$withval"/include/nss.h -a -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ AC_MSG_RESULT(yes)
+ elif test "$withval" = "no"
+ then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([NSS is required.])
+ elif test -e "$withval"/include/nss.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
NSSDIR=$withval
@@ -36,11 +43,11 @@ AC_ARG_WITH(nss, [ --with-nss=PATH Network Security Services (NSS) dire
AC_MSG_ERROR([$withval not found])
fi
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
# check for --with-nss-inc
AC_MSG_CHECKING(for --with-nss-inc)
-AC_ARG_WITH(nss-inc, [ --with-nss-inc=PATH Network Security Services (NSS) include directory],
+AC_ARG_WITH(nss-inc, AS_HELP_STRING([--with-nss-inc=PATH],[Network Security Services (NSS) include directory]),
[
if test -e "$withval"/nss.h
then
@@ -55,7 +62,7 @@ AC_MSG_RESULT(no))
# check for --with-nss-lib
AC_MSG_CHECKING(for --with-nss-lib)
-AC_ARG_WITH(nss-lib, [ --with-nss-lib=PATH Network Security Services (NSS) library directory],
+AC_ARG_WITH(nss-lib, AS_HELP_STRING([--with-nss-lib=PATH],[Network Security Services (NSS) library directory]),
[
if test -d "$withval"
then
diff --git a/m4/openldap.m4 b/m4/openldap.m4
index 29dc115..cf91a89 100644
--- a/m4/openldap.m4
+++ b/m4/openldap.m4
@@ -22,11 +22,14 @@ AC_CHECKING(for OpenLDAP)
# check for --with-openldap
AC_MSG_CHECKING(for --with-openldap)
-AC_ARG_WITH(openldap, AS_HELP_STRING([--with-openldap[=PATH]],[Use OpenLDAP - optional PATH is path to OpenLDAP SDK]),
+AC_ARG_WITH(openldap, AS_HELP_STRING([--with-openldap@<:@=PATH@:>@],[Use OpenLDAP - optional PATH is path to OpenLDAP SDK]),
[
if test "$withval" = yes
then
AC_MSG_RESULT([using system OpenLDAP])
+ elif test "$withval" = no
+ then
+ AC_MSG_RESULT(no)
elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
@@ -46,7 +49,7 @@ AC_MSG_RESULT(no))
# check for --with-openldap-inc
AC_MSG_CHECKING(for --with-openldap-inc)
-AC_ARG_WITH(openldap-inc, [ --with-openldap-inc=PATH OpenLDAP SDK include directory],
+AC_ARG_WITH(openldap-inc, AS_HELP_STRING([--with-openldap-inc=PATH],[OpenLDAP SDK include directory]),
[
if test -e "$withval"/ldap.h
then
@@ -63,7 +66,7 @@ AC_MSG_RESULT(no))
# check for --with-openldap-lib
AC_MSG_CHECKING(for --with-openldap-lib)
-AC_ARG_WITH(openldap-lib, [ --with-openldap-lib=PATH OpenLDAP SDK library directory],
+AC_ARG_WITH(openldap-lib, AS_HELP_STRING([--with-openldap-lib=PATH],[OpenLDAP SDK library directory]),
[
if test -d "$withval"
then
@@ -80,7 +83,7 @@ AC_MSG_RESULT(no))
# check for --with-openldap-bin
AC_MSG_CHECKING(for --with-openldap-bin)
-AC_ARG_WITH(openldap-bin, [ --with-openldap-bin=PATH OpenLDAP SDK binary directory],
+AC_ARG_WITH(openldap-bin, AS_HELP_STRING([--with-openldap-bin=PATH],[OpenLDAP SDK binary directory]),
[
if test -d "$withval"
then
@@ -96,8 +99,8 @@ AC_MSG_RESULT(no))
# if OPENLDAP is not found yet, try pkg-config
-if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir" -o -z "$openldap_bindir"; then
- if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths
+if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths
+ if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir" -o -z "$openldap_bindir"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_MSG_CHECKING(for OpenLDAP with pkg-config)
if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists openldap; then
@@ -143,5 +146,4 @@ if test "$with_openldap" = yes ; then
CPPFLAGS="$save_cppflags"
AC_DEFINE([USE_OPENLDAP], [1], [If defined, using OpenLDAP for LDAP SDK])
- with_ldapsdk=no # using openldap not mozldap
fi
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index 0c7569d..1fec03d 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -18,28 +18,17 @@
#
# END COPYRIGHT BLOCK
-AC_CHECKING(for pcre)
+AC_CHECKING(for PCRE)
dnl - check for --with-pcre
AC_MSG_CHECKING(for --with-pcre)
-AC_ARG_WITH(pcre, [ --with-pcre=PATH Perl Compatible Regular Expression directory],
+AC_ARG_WITH(pcre, AS_HELP_STRING([--with-pcre@<:@=PATH@:>@],[Perl Compatible Regular Expression directory]),
[
if test "$withval" = "yes"; then
AC_MSG_RESULT(yes)
- dnl - check in system locations
- if test -f "/usr/include/pcre/pcre.h"; then
- pcre_incdir="/usr/include/pcre"
- pcre_inc="-I/usr/include/pcre"
- pcre_lib='-L$(libdir)'
- pcre_libdir='$(libdir)'
- elif test -f "/usr/include/pcre.h"; then
- pcre_incdir="/usr/include"
- pcre_inc="-I/usr/include"
- pcre_lib='-L$(libdir)'
- pcre_libdir='$(libdir)'
- else
- AC_MSG_ERROR([pcre.h not found])
- fi
+ elif test "$withval" = "no"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([PCRE is required.])
elif test -d "$withval"/include -a -d "$withval"/lib; then
AC_MSG_RESULT([using $withval])
dnl - check the user provided location
@@ -56,7 +45,7 @@ AC_ARG_WITH(pcre, [ --with-pcre=PATH Perl Compatible Regular Expression direc
AC_MSG_ERROR([$withval not found])
fi
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
#
# if PCRE is not found yet, try pkg-config
@@ -84,7 +73,13 @@ dnl last resort
dnl - check in system locations
if test -z "$pcre_inc"; then
AC_MSG_CHECKING(for pcre.h)
- if test -f "/usr/include/pcre.h"; then
+ if test -f "/usr/include/pcre/pcre.h"; then
+ AC_MSG_RESULT([using /usr/include/pcre/pcre.h])
+ pcre_incdir="/usr/include/pcre"
+ pcre_inc="-I/usr/include/pcre"
+ pcre_lib='-L$(libdir)'
+ pcre_libdir='$(libdir)'
+ elif test -f "/usr/include/pcre.h"; then
AC_MSG_RESULT([using /usr/include/pcre.h])
pcre_incdir="/usr/include"
pcre_inc="-I/usr/include"
@@ -92,6 +87,6 @@ if test -z "$pcre_inc"; then
pcre_libdir='$(libdir)'
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR([pcre not found, specify with --with-pcre.])
+ AC_MSG_ERROR([PCRE not found, specify with --with-pcre.])
fi
fi
diff --git a/m4/sasl.m4 b/m4/sasl.m4
index 00b2f2a..b875e70 100644
--- a/m4/sasl.m4
+++ b/m4/sasl.m4
@@ -27,24 +27,19 @@ dnl ========================================================
dnl ========================================================
dnl = Use the sasl libraries on the system (assuming it exists)
dnl ========================================================
-AC_CHECKING(for sasl)
+AC_CHECKING(for SASL)
AC_MSG_CHECKING(for --with-sasl)
AC_ARG_WITH(sasl,
- [[ --with-sasl=PATH Use sasl from supplied path]],
+ AS_HELP_STRING([--with-sasl@<:@=PATH@:>@],[Use SASL from supplied path]),
dnl = Look in the standard system locations
[
if test "$withval" = "yes"; then
AC_MSG_RESULT(yes)
- dnl = Check for sasl.h in the normal locations
- if test -f /usr/include/sasl/sasl.h; then
- sasl_inc="-I/usr/include/sasl"
- elif test -f /usr/include/sasl.h; then
- sasl_inc="-I/usr/include"
- else
- AC_MSG_ERROR(sasl.h not found)
- fi
+ elif test "$withval" = "no"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([SASL is required.])
dnl = Check the user provided location
elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then
@@ -62,14 +57,14 @@ AC_ARG_WITH(sasl,
sasl_libdir="$withval/lib"
else
AC_MSG_RESULT(yes)
- AC_MSG_ERROR([sasl not found in $withval])
+ AC_MSG_ERROR([SASL not found in $withval])
fi
],
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(yes))
AC_MSG_CHECKING(for --with-sasl-inc)
AC_ARG_WITH(sasl-inc,
- [[ --with-sasl-inc=PATH SASL include file directory]],
+ AS_HELP_STRING([--with-sasl-inc=PATH],[SASL include file directory]),
[
if test -f "$withval"/sasl.h; then
AC_MSG_RESULT([using $withval])
@@ -83,7 +78,7 @@ AC_ARG_WITH(sasl-inc,
AC_MSG_CHECKING(for --with-sasl-lib)
AC_ARG_WITH(sasl-lib,
- [[ --with-sasl-lib=PATH SASL library directory]],
+ AS_HELP_STRING([--with-sasl-lib=PATH],[SASL library directory]),
[
if test -d "$withval"; then
AC_MSG_RESULT([using $withval])
@@ -107,6 +102,6 @@ if test -z "$sasl_inc"; then
sasl_inc="-I/usr/include"
else
AC_MSG_RESULT(no)
- AC_MSG_ERROR([sasl not found, specify with --with-sasl.])
+ AC_MSG_ERROR([SASL not found, specify with --with-sasl.])
fi
fi
diff --git a/m4/selinux.m4 b/m4/selinux.m4
index de97c94..5a574d1 100644
--- a/m4/selinux.m4
+++ b/m4/selinux.m4
@@ -22,13 +22,17 @@ AC_CHECKING(for SELinux)
# check for --with-selinux
AC_MSG_CHECKING(for --with-selinux)
-AC_ARG_WITH(selinux, [ --with-selinux Build SELinux policy],
+AC_ARG_WITH(selinux, AS_HELP_STRING([--with-selinux],[Build SELinux policy]),
[
- with_selinux=yes
- AC_MSG_RESULT(yes)
- AC_SUBST(with_selinux)
- if test ! -f "/usr/share/selinux/devel/Makefile"; then
- AC_MSG_ERROR([SELinux development tools (selinux-policy) not found])
+ if test "$withval" = "no"; then
+ AC_MSG_RESULT(no)
+ else
+ with_selinux=yes
+ AC_MSG_RESULT(yes)
+ AC_SUBST(with_selinux)
+ if test ! -f "/usr/share/selinux/devel/Makefile"; then
+ AC_MSG_ERROR([SELinux development tools (selinux-policy) not found])
+ fi
fi
],
AC_MSG_RESULT(no))
diff --git a/m4/svrcore.m4 b/m4/svrcore.m4
index 5051f73..7164ab9 100644
--- a/m4/svrcore.m4
+++ b/m4/svrcore.m4
@@ -20,22 +20,19 @@
#
# Configure paths for SVRCORE
-AC_CHECKING(for svrcore)
+AC_CHECKING(for SVRCORE)
AC_MSG_CHECKING(for --with-svrcore)
AC_ARG_WITH(svrcore,
- [[ --with-svrcore[=PATH] Use system installed svrcore - optional path for svrcore]],
+ AS_HELP_STRING([--with-svrcore@<:@=PATH@:>@],[Use system installed SVRCORE - optional path for SVRCORE]),
dnl = Look in the standard system locations
[
if test "$withval" = "yes"; then
AC_MSG_RESULT(yes)
- dnl = Check for svrcore.h in the normal locations
- if test -f /usr/include/svrcore.h; then
- svrcore_inc="-I/usr/include"
- else
- AC_MSG_ERROR(svrcore.h not found)
- fi
+ elif test "$withval" = "no"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([SVRCORE is required.])
dnl = Check the user provided location
elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then
@@ -50,14 +47,14 @@ AC_ARG_WITH(svrcore,
svrcore_lib="-L$withval/lib"
else
AC_MSG_RESULT(yes)
- AC_MSG_ERROR([svrcore not found in $withval])
+ AC_MSG_ERROR([SVRCORE not found in $withval])
fi
],
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(yes))
AC_MSG_CHECKING(for --with-svrcore-inc)
AC_ARG_WITH(svrcore-inc,
- [[ --with-svrcore-inc=PATH SVRCORE include file directory]],
+ AS_HELP_STRING([--with-svrcore-inc=PATH],[SVRCORE include file directory]),
[
if test -f "$withval"/svrcore.h; then
AC_MSG_RESULT([using $withval])
@@ -71,7 +68,7 @@ AC_ARG_WITH(svrcore-inc,
AC_MSG_CHECKING(for --with-svrcore-lib)
AC_ARG_WITH(svrcore-lib,
- [[ --with-svrcore-lib=PATH SVRCORE library directory]],
+ AS_HELP_STRING([--with-svrcore-lib=PATH],[SVRCORE library directory]),
[
if test -d "$withval"; then
AC_MSG_RESULT([using $withval])
@@ -86,7 +83,7 @@ AC_ARG_WITH(svrcore-lib,
dnl svrcore not given - look for pkg-config
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config)
- AC_MSG_CHECKING(for svrcore with pkg-config)
+ AC_MSG_CHECKING(for SVRCORE with pkg-config)
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists svrcore; then
svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore`
@@ -97,18 +94,28 @@ if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then
fi
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then
-dnl just see if svrcore is already a system library
+dnl just see if SVRCORE is already a system library
AC_CHECK_LIB([svrcore], [SVRCORE_GetRegisteredPinObj], [havesvrcore=1],
[], [$nss_inc $nspr_inc $nss_lib -lnss3 -lsoftokn3 $nspr_lib -lplds4 -lplc4 -lnspr4])
if test -n "$havesvrcore" ; then
-dnl just see if svrcore is already a system header file
+dnl just see if SVRCORE is already a system header file
save_cppflags="$CPPFLAGS"
CPPFLAGS="$nss_inc $nspr_inc"
AC_CHECK_HEADER([svrcore.h], [havesvrcore=1], [havesvrcore=])
CPPFLAGS="$save_cppflags"
fi
-dnl for svrcore to be present, both the library and the header must exist
+dnl for SVRCORE to be present, both the library and the header must exist
if test -z "$havesvrcore" ; then
- AC_MSG_ERROR([svrcore not found, specify with --with-svrcore.])
+ AC_MSG_ERROR([SVRCORE not found, specify with --with-svrcore.])
+ fi
+fi
+
+dnl = Check for svrcore.h in the normal locations
+if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then
+ if test -f /usr/include/svrcore.h; then
+ svrcore_inc="-I/usr/include"
+ svrcore_lib="-L/usr/lib"
+ else
+ AC_MSG_ERROR([SVRCORE not found, specify with --with-svrcore.])
fi
fi
14 years
mod_nss nss_engine_log.c,1.5,1.6
by Rob Crittenden
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv10045
Modified Files:
nss_engine_log.c
Log Message:
Update list of error messages
Index: nss_engine_log.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_log.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- nss_engine_log.c 17 Oct 2006 16:45:57 -0000 1.5
+++ nss_engine_log.c 22 Mar 2010 18:07:14 -0000 1.6
@@ -27,7 +27,7 @@
#define LIBSEC_ERROR_BASE (-8192)
#define LIBSEC_MAX_ERROR (LIBSEC_ERROR_BASE + 155)
#define LIBSSL_ERROR_BASE (-12288)
-#define LIBSSL_MAX_ERROR (LIBSSL_ERROR_BASE + 102)
+#define LIBSSL_MAX_ERROR (LIBSSL_ERROR_BASE + 114)
typedef struct l_error_t {
int errorNumber;
@@ -296,7 +296,19 @@
{ 99, "Server requires ciphers more secure than those supported by client" },
{ 100, "Peer reports it experienced an internal error" },
{ 101, "Peer user canceled handshake" },
- { 102, "Peer does not permit renegotiation of SSL security parameters" }
+ { 102, "Peer does not permit renegotiation of SSL security parameters" },
+ { 103, "Server cache not configured" },
+ { 104, "Unsupported extension" },
+ { 105, "Certificate unobtainable" },
+ { 106, "Unrecognized name" },
+ { 107, "Bad certificate status" },
+ { 108, "Bad certificate hash value" },
+ { 109, "Unexpected new session ticket" },
+ { 110, "Malformed new session ticket" },
+ { 111, "Decompression failure" },
+ { 112, "Renegotiation not allowed" },
+ { 113, "Safe negotiation required but not provided by client" },
+ { 114, "Unexpected uncompressed record" },
};
void nss_die(void)
14 years
Branch 'Directory_Server_8_2_Branch' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/repl5_inc_protocol.c | 14 ++++++
ldap/servers/plugins/replication/repl5_protocol.c | 38 +++++++++++-------
ldap/servers/plugins/replication/repl5_tot_protocol.c | 18 ++++++++
3 files changed, 56 insertions(+), 14 deletions(-)
New commits:
commit a30b3bd05457535fc33bbb38336b2f85d174bedd
Author: Noriko Hosoi <nhosoi(a)jiji.sjc.redhat.com>
Date: Sun Mar 21 17:13:18 2010 -0700
548533 - memory leak in Repl_5_Inc_Protocol_new
https://bugzilla.redhat.com/show_bug.cgi?id=548533
Description: repl5_inc_delete and repl5_tot_delete to release the
incremental and total update protocol were not implemented. This
fix implemented them. Also, it fixed a leak of connection in
private_protocol_factory.
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 4e733de..d999d3b 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -511,7 +511,21 @@ static void
repl5_inc_delete(Private_Repl_Protocol **prpp)
{
/* First, stop the protocol if it isn't already stopped */
+ if (!(*prpp)->stopped) {
+ (*prpp)->stopped = 1;
+ (*prpp)->stop(*prpp);
+ }
/* Then, delete all resources used by the protocol */
+ if ((*prpp)->lock) {
+ PR_DestroyLock((*prpp)->lock);
+ (*prpp)->lock = NULL;
+ }
+ if ((*prpp)->cvar) {
+ PR_DestroyCondVar((*prpp)->cvar);
+ (*prpp)->cvar = NULL;
+ }
+ slapi_ch_free((void **)&(*prpp)->private);
+ slapi_ch_free((void **)prpp);
}
/* helper function */
diff --git a/ldap/servers/plugins/replication/repl5_protocol.c b/ldap/servers/plugins/replication/repl5_protocol.c
index efb3271..31f6072 100644
--- a/ldap/servers/plugins/replication/repl5_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_protocol.c
@@ -109,11 +109,7 @@ prot_new(Repl_Agmt *agmt, int protocol_state)
goto loser;
}
rp->agmt = agmt;
- /* now done in private_protocol_factory
- if ((rp->conn = conn_new(agmt)) == NULL)
- {
- goto loser;
- } */
+ rp->conn = NULL;
/* Acquire the local replica object */
replarea_sdn = agmt_get_replarea(agmt);
rp->replica_object = replica_get_replica_from_dn(replarea_sdn);
@@ -585,20 +581,36 @@ private_protocol_factory(Repl_Protocol *rp, int type)
switch (type)
{
case PROTOCOL_5_INCREMENTAL:
- if ((rp->conn = conn_new(rp->agmt)) != NULL)
- prp = Repl_5_Inc_Protocol_new(rp);
+ if (NULL == rp->conn) {
+ rp->conn = conn_new(rp->agmt);
+ }
+ if (NULL != rp->conn) {
+ prp = Repl_5_Inc_Protocol_new(rp);
+ }
break;
case PROTOCOL_5_TOTAL:
- if ((rp->conn = conn_new(rp->agmt)) != NULL)
- prp = Repl_5_Tot_Protocol_new(rp);
+ if (NULL == rp->conn) {
+ rp->conn = conn_new(rp->agmt);
+ }
+ if (NULL != rp->conn) {
+ prp = Repl_5_Tot_Protocol_new(rp);
+ }
break;
case PROTOCOL_WINDOWS_INCREMENTAL:
- if ((rp->conn = windows_conn_new(rp->agmt)) != NULL)
- prp = Windows_Inc_Protocol_new(rp);
+ if (NULL == rp->conn) {
+ rp->conn = windows_conn_new(rp->agmt);
+ }
+ if (NULL != rp->conn) {
+ prp = Windows_Inc_Protocol_new(rp);
+ }
break;
case PROTOCOL_WINDOWS_TOTAL:
- if ((rp->conn = windows_conn_new(rp->agmt)) != NULL)
- prp = Windows_Tot_Protocol_new(rp);
+ if (NULL == rp->conn) {
+ rp->conn = windows_conn_new(rp->agmt);
+ }
+ if (NULL != rp->conn) {
+ prp = Windows_Tot_Protocol_new(rp);
+ }
break;
}
return prp;
diff --git a/ldap/servers/plugins/replication/repl5_tot_protocol.c b/ldap/servers/plugins/replication/repl5_tot_protocol.c
index 11c8255..7bd6e25 100644
--- a/ldap/servers/plugins/replication/repl5_tot_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c
@@ -584,8 +584,24 @@ loser:
}
static void
-repl5_tot_delete(Private_Repl_Protocol **prp)
+repl5_tot_delete(Private_Repl_Protocol **prpp)
{
+ /* First, stop the protocol if it isn't already stopped */
+ if (!(*prpp)->stopped) {
+ (*prpp)->stopped = 1;
+ (*prpp)->stop(*prpp);
+ }
+ /* Then, delete all resources used by the protocol */
+ if ((*prpp)->lock) {
+ PR_DestroyLock((*prpp)->lock);
+ (*prpp)->lock = NULL;
+ }
+ if ((*prpp)->cvar) {
+ PR_DestroyCondVar((*prpp)->cvar);
+ (*prpp)->cvar = NULL;
+ }
+ slapi_ch_free((void **)&(*prpp)->private);
+ slapi_ch_free((void **)prpp);
}
static
14 years