This commit is contained in:
parent
4a835de402
commit
bb6ca68940
64
libldap_ctrl_lderrno.dif
Normal file
64
libldap_ctrl_lderrno.dif
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
Index: libraries/libldap/pagectrl.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/pagectrl.c,v
|
||||||
|
retrieving revision 1.10
|
||||||
|
retrieving revision 1.11
|
||||||
|
diff -u -r1.10 -r1.11
|
||||||
|
--- libraries/libldap/pagectrl.c 9 Jan 2008 12:28:09 -0000 1.10
|
||||||
|
+++ libraries/libldap/pagectrl.c 21 Oct 2008 14:17:41 -0000 1.11
|
||||||
|
@@ -71,6 +71,7 @@
|
||||||
|
|
||||||
|
value->bv_val = NULL;
|
||||||
|
value->bv_len = 0;
|
||||||
|
+ ld->ld_errno = LDAP_SUCCESS;
|
||||||
|
|
||||||
|
if ( cookie == NULL ) {
|
||||||
|
cookie = &null_cookie;
|
||||||
|
Index: libraries/libldap/sortctrl.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/sortctrl.c,v
|
||||||
|
retrieving revision 1.24
|
||||||
|
retrieving revision 1.25
|
||||||
|
diff -u -r1.24 -r1.25
|
||||||
|
--- libraries/libldap/sortctrl.c 7 Jan 2008 23:20:04 -0000 1.24
|
||||||
|
+++ libraries/libldap/sortctrl.c 21 Oct 2008 14:17:41 -0000 1.25
|
||||||
|
@@ -304,6 +304,7 @@
|
||||||
|
|
||||||
|
value->bv_val = NULL;
|
||||||
|
value->bv_len = 0;
|
||||||
|
+ ld->ld_errno = LDAP_SUCCESS;
|
||||||
|
|
||||||
|
ber = ldap_alloc_ber_with_options( ld );
|
||||||
|
if ( ber == NULL) {
|
||||||
|
Index: libraries/libldap/vlvctrl.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/vlvctrl.c,v
|
||||||
|
retrieving revision 1.25
|
||||||
|
retrieving revision 1.26
|
||||||
|
diff -u -r1.25 -r1.26
|
||||||
|
--- libraries/libldap/vlvctrl.c 7 Jan 2008 23:20:05 -0000 1.25
|
||||||
|
+++ libraries/libldap/vlvctrl.c 21 Oct 2008 14:17:41 -0000 1.26
|
||||||
|
@@ -101,6 +101,7 @@
|
||||||
|
|
||||||
|
value->bv_val = NULL;
|
||||||
|
value->bv_len = 0;
|
||||||
|
+ ld->ld_errno = LDAP_SUCCESS;
|
||||||
|
|
||||||
|
ber = ldap_alloc_ber_with_options( ld );
|
||||||
|
if ( ber == NULL ) {
|
||||||
|
Index: libraries/libldap/stctrl.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/stctrl.c,v
|
||||||
|
retrieving revision 1.4
|
||||||
|
retrieving revision 1.5
|
||||||
|
diff -u -r1.4 -r1.5
|
||||||
|
--- libraries/libldap/stctrl.c 7 Jan 2008 23:20:04 -0000 1.4
|
||||||
|
+++ libraries/libldap/stctrl.c 21 Oct 2008 14:17:41 -0000 1.5
|
||||||
|
@@ -60,6 +60,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
assert( LDAP_VALID( ld ) );
|
||||||
|
+ ld->ld_errno = LDAP_SUCCESS;
|
||||||
|
|
||||||
|
/* check sizes according to I.D. */
|
||||||
|
if ( sessionSourceIp == NULL ) {
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 23 12:59:08 CEST 2008 - rhafer@suse.de
|
||||||
|
|
||||||
|
- the helper function to create various LDAP controls returned
|
||||||
|
wrong error codes under certain circumstances
|
||||||
|
(bnc#429064, ITS#5762)
|
||||||
|
- Fixed referral chasing in chain-overlay (bnc#438088, ITS#5742)
|
||||||
|
- Fixed back-config integration of overlays with private instances
|
||||||
|
of databases (translucent, chain, ...) (bnc#438094, ITS#5736)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 13 11:33:57 CEST 2008 - rhafer@suse.de
|
Mon Oct 13 11:33:57 CEST 2008 - rhafer@suse.de
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ BuildRequires: -pwdutils
|
|||||||
BuildRequires: -db-devel -pwdutils libdb-4_5-devel
|
BuildRequires: -db-devel -pwdutils libdb-4_5-devel
|
||||||
%endif
|
%endif
|
||||||
Version: 2.4.12
|
Version: 2.4.12
|
||||||
Release: 1
|
Release: 2
|
||||||
Url: http://www.openldap.org
|
Url: http://www.openldap.org
|
||||||
License: BSD 3-Clause
|
License: BSD 3-Clause
|
||||||
%if "%{name}" == "openldap2"
|
%if "%{name}" == "openldap2"
|
||||||
@ -62,6 +62,9 @@ Patch9: openldap2-add-gnu-source.diff
|
|||||||
Patch11: slapd-bconfig-del-db.dif
|
Patch11: slapd-bconfig-del-db.dif
|
||||||
Patch13: slapd-bdb-stop-checkpoint.dif
|
Patch13: slapd-bdb-stop-checkpoint.dif
|
||||||
Patch14: slapo-collect-include.dif
|
Patch14: slapo-collect-include.dif
|
||||||
|
Patch15: libldap_ctrl_lderrno.dif
|
||||||
|
Patch16: slapd-privdb-config-its5736.dif
|
||||||
|
Patch17: slapo-chain-dangling-its5742.dif
|
||||||
Patch100: openldap-2.3.37.dif
|
Patch100: openldap-2.3.37.dif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -165,6 +168,9 @@ Authors:
|
|||||||
%patch11
|
%patch11
|
||||||
%patch13
|
%patch13
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
|
%patch15
|
||||||
|
%patch16
|
||||||
|
%patch17
|
||||||
cp %{SOURCE5} .
|
cp %{SOURCE5} .
|
||||||
cd ../openldap-2.3.37
|
cd ../openldap-2.3.37
|
||||||
%patch100
|
%patch100
|
||||||
@ -503,6 +509,13 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 23 2008 rhafer@suse.de
|
||||||
|
- the helper function to create various LDAP controls returned
|
||||||
|
wrong error codes under certain circumstances
|
||||||
|
(bnc#429064, ITS#5762)
|
||||||
|
- Fixed referral chasing in chain-overlay (bnc#438088, ITS#5742)
|
||||||
|
- Fixed back-config integration of overlays with private instances
|
||||||
|
of databases (translucent, chain, ...) (bnc#438094, ITS#5736)
|
||||||
* Mon Oct 13 2008 rhafer@suse.de
|
* Mon Oct 13 2008 rhafer@suse.de
|
||||||
- Added missing #include to slapo-collect
|
- Added missing #include to slapo-collect
|
||||||
* Mon Oct 13 2008 rhafer@suse.de
|
* Mon Oct 13 2008 rhafer@suse.de
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 23 12:59:08 CEST 2008 - rhafer@suse.de
|
||||||
|
|
||||||
|
- the helper function to create various LDAP controls returned
|
||||||
|
wrong error codes under certain circumstances
|
||||||
|
(bnc#429064, ITS#5762)
|
||||||
|
- Fixed referral chasing in chain-overlay (bnc#438088, ITS#5742)
|
||||||
|
- Fixed back-config integration of overlays with private instances
|
||||||
|
of databases (translucent, chain, ...) (bnc#438094, ITS#5736)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 13 11:33:57 CEST 2008 - rhafer@suse.de
|
Mon Oct 13 11:33:57 CEST 2008 - rhafer@suse.de
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ BuildRequires: -pwdutils
|
|||||||
BuildRequires: -db-devel -pwdutils libdb-4_5-devel
|
BuildRequires: -db-devel -pwdutils libdb-4_5-devel
|
||||||
%endif
|
%endif
|
||||||
Version: 2.4.12
|
Version: 2.4.12
|
||||||
Release: 1
|
Release: 2
|
||||||
Url: http://www.openldap.org
|
Url: http://www.openldap.org
|
||||||
License: BSD 3-Clause; openldap 2.8
|
License: BSD 3-Clause; openldap 2.8
|
||||||
%if "%{name}" == "openldap2"
|
%if "%{name}" == "openldap2"
|
||||||
@ -62,6 +62,9 @@ Patch9: openldap2-add-gnu-source.diff
|
|||||||
Patch11: slapd-bconfig-del-db.dif
|
Patch11: slapd-bconfig-del-db.dif
|
||||||
Patch13: slapd-bdb-stop-checkpoint.dif
|
Patch13: slapd-bdb-stop-checkpoint.dif
|
||||||
Patch14: slapo-collect-include.dif
|
Patch14: slapo-collect-include.dif
|
||||||
|
Patch15: libldap_ctrl_lderrno.dif
|
||||||
|
Patch16: slapd-privdb-config-its5736.dif
|
||||||
|
Patch17: slapo-chain-dangling-its5742.dif
|
||||||
Patch100: openldap-2.3.37.dif
|
Patch100: openldap-2.3.37.dif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -168,6 +171,9 @@ Authors:
|
|||||||
%patch11
|
%patch11
|
||||||
%patch13
|
%patch13
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
|
%patch15
|
||||||
|
%patch16
|
||||||
|
%patch17
|
||||||
cp %{SOURCE5} .
|
cp %{SOURCE5} .
|
||||||
cd ../openldap-2.3.37
|
cd ../openldap-2.3.37
|
||||||
%patch100
|
%patch100
|
||||||
@ -506,6 +512,13 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 23 2008 rhafer@suse.de
|
||||||
|
- the helper function to create various LDAP controls returned
|
||||||
|
wrong error codes under certain circumstances
|
||||||
|
(bnc#429064, ITS#5762)
|
||||||
|
- Fixed referral chasing in chain-overlay (bnc#438088, ITS#5742)
|
||||||
|
- Fixed back-config integration of overlays with private instances
|
||||||
|
of databases (translucent, chain, ...) (bnc#438094, ITS#5736)
|
||||||
* Mon Oct 13 2008 rhafer@suse.de
|
* Mon Oct 13 2008 rhafer@suse.de
|
||||||
- Added missing #include to slapo-collect
|
- Added missing #include to slapo-collect
|
||||||
* Mon Oct 13 2008 rhafer@suse.de
|
* Mon Oct 13 2008 rhafer@suse.de
|
||||||
|
267
slapd-privdb-config-its5736.dif
Normal file
267
slapd-privdb-config-its5736.dif
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
Index: servers/slapd/overlays/translucent.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/translucent.c,v
|
||||||
|
retrieving revision 1.54
|
||||||
|
retrieving revision 1.55
|
||||||
|
diff -u -r1.54 -r1.55
|
||||||
|
--- servers/slapd/overlays/translucent.c 6 Oct 2008 23:59:52 -0000 1.54
|
||||||
|
+++ servers/slapd/overlays/translucent.c 12 Oct 2008 18:20:47 -0000 1.55
|
||||||
|
@@ -95,14 +95,6 @@
|
||||||
|
{ NULL, NULL, 0, 0, 0, ARG_IGNORED }
|
||||||
|
};
|
||||||
|
|
||||||
|
-static ConfigTable transdummy[] = {
|
||||||
|
- { "", "", 0, 0, 0, ARG_IGNORED,
|
||||||
|
- NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
|
||||||
|
- "DESC 'The backend type for a database instance' "
|
||||||
|
- "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
|
||||||
|
- { NULL, NULL, 0, 0, 0, ARG_IGNORED }
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
static ConfigOCs translucentocs[] = {
|
||||||
|
{ "( OLcfgOvOc:14.1 "
|
||||||
|
"NAME 'olcTranslucentConfig' "
|
||||||
|
@@ -115,7 +107,7 @@
|
||||||
|
{ "( OLcfgOvOc:14.2 "
|
||||||
|
"NAME 'olcTranslucentDatabase' "
|
||||||
|
"DESC 'Translucent target database configuration' "
|
||||||
|
- "AUXILIARY )", Cft_Misc, transdummy, translucent_ldadd },
|
||||||
|
+ "AUXILIARY )", Cft_Misc, olcDatabaseDummy, translucent_ldadd },
|
||||||
|
{ NULL, 0, NULL }
|
||||||
|
};
|
||||||
|
/* for translucent_init() */
|
||||||
|
Index: servers/slapd/overlays/pcache.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/pcache.c,v
|
||||||
|
retrieving revision 1.153
|
||||||
|
retrieving revision 1.154
|
||||||
|
diff -u -r1.153 -r1.154
|
||||||
|
--- servers/slapd/overlays/pcache.c 4 Sep 2008 05:43:19 -0000 1.153
|
||||||
|
+++ servers/slapd/overlays/pcache.c 12 Oct 2008 18:20:47 -0000 1.154
|
||||||
|
@@ -2655,15 +2655,6 @@
|
||||||
|
{ NULL, NULL, 0, 0, 0, ARG_IGNORED }
|
||||||
|
};
|
||||||
|
|
||||||
|
-/* Need to no-op this keyword for dynamic config */
|
||||||
|
-static ConfigTable pcdummy[] = {
|
||||||
|
- { "", "", 0, 0, 0, ARG_IGNORED,
|
||||||
|
- NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
|
||||||
|
- "DESC 'The backend type for a database instance' "
|
||||||
|
- "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
|
||||||
|
- { NULL, NULL, 0, 0, 0, ARG_IGNORED }
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
static ConfigOCs pcocs[] = {
|
||||||
|
{ "( OLcfgOvOc:2.1 "
|
||||||
|
"NAME 'olcPcacheConfig' "
|
||||||
|
@@ -2675,7 +2666,7 @@
|
||||||
|
{ "( OLcfgOvOc:2.2 "
|
||||||
|
"NAME 'olcPcacheDatabase' "
|
||||||
|
"DESC 'Cache database configuration' "
|
||||||
|
- "AUXILIARY )", Cft_Misc, pcdummy, pc_ldadd },
|
||||||
|
+ "AUXILIARY )", Cft_Misc, olcDatabaseDummy, pc_ldadd },
|
||||||
|
{ NULL, 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -3995,11 +3986,6 @@
|
||||||
|
code = config_register_schema( pccfg, pcocs );
|
||||||
|
if ( code ) return code;
|
||||||
|
|
||||||
|
- {
|
||||||
|
- const char *text;
|
||||||
|
- code = slap_str2ad( "olcDatabase", &pcdummy[0].ad, &text );
|
||||||
|
- if ( code ) return code;
|
||||||
|
- }
|
||||||
|
return overlay_register( &pcache );
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: servers/slapd/back-monitor/database.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-monitor/database.c,v
|
||||||
|
retrieving revision 1.97
|
||||||
|
retrieving revision 1.98
|
||||||
|
diff -u -r1.97 -r1.98
|
||||||
|
--- servers/slapd/back-monitor/database.c 26 May 2008 18:53:16 -0000 1.97
|
||||||
|
+++ servers/slapd/back-monitor/database.c 12 Oct 2008 18:20:46 -0000 1.98
|
||||||
|
@@ -160,12 +160,12 @@
|
||||||
|
"monitor_subsys_database_init: "
|
||||||
|
"missing suffix for %s\n",
|
||||||
|
rdnval, 0, 0 );
|
||||||
|
- return -1;
|
||||||
|
- }
|
||||||
|
- attr_merge( e, slap_schema.si_ad_namingContexts,
|
||||||
|
+ } else {
|
||||||
|
+ attr_merge( e, slap_schema.si_ad_namingContexts,
|
||||||
|
be->be_suffix, be->be_nsuffix );
|
||||||
|
- attr_merge( e_database, slap_schema.si_ad_namingContexts,
|
||||||
|
+ attr_merge( e_database, slap_schema.si_ad_namingContexts,
|
||||||
|
be->be_suffix, be->be_nsuffix );
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
(void)init_readOnly( mi, e, be->be_restrictops );
|
||||||
|
Index: servers/slapd/back-ldap/chain.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldap/chain.c,v
|
||||||
|
retrieving revision 1.69
|
||||||
|
retrieving revision 1.70
|
||||||
|
diff -u -r1.69 -r1.70
|
||||||
|
--- servers/slapd/back-ldap/chain.c 7 Jan 2008 23:20:11 -0000 1.69
|
||||||
|
+++ servers/slapd/back-ldap/chain.c 12 Oct 2008 18:20:46 -0000 1.70
|
||||||
|
@@ -63,6 +63,7 @@
|
||||||
|
LDAP_CH_RES,
|
||||||
|
LDAP_CH_ERR
|
||||||
|
} ldap_chain_status_t;
|
||||||
|
+
|
||||||
|
static BackendInfo *lback;
|
||||||
|
|
||||||
|
typedef struct ldap_chain_t {
|
||||||
|
@@ -1096,7 +1097,7 @@
|
||||||
|
"NAME 'olcChainDatabase' "
|
||||||
|
"DESC 'Chain remote server configuration' "
|
||||||
|
"AUXILIARY )",
|
||||||
|
- Cft_Misc, chaincfg, chain_ldadd },
|
||||||
|
+ Cft_Misc, olcDatabaseDummy, chain_ldadd },
|
||||||
|
{ NULL, 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -1187,6 +1188,8 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ ca->ca_private = on;
|
||||||
|
+
|
||||||
|
done:;
|
||||||
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
|
(void)ldap_chain_db_destroy_one( ca->be, NULL );
|
||||||
|
@@ -1510,17 +1513,11 @@
|
||||||
|
ldap_chain_t *lc = NULL;
|
||||||
|
|
||||||
|
if ( lback == NULL ) {
|
||||||
|
- static BackendInfo lback2;
|
||||||
|
-
|
||||||
|
lback = backend_info( "ldap" );
|
||||||
|
|
||||||
|
if ( lback == NULL ) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- lback2 = *lback;
|
||||||
|
- lback2.bi_type = ldapchain.on_bi.bi_type;
|
||||||
|
- lback = &lback2;
|
||||||
|
}
|
||||||
|
|
||||||
|
lc = ch_malloc( sizeof( ldap_chain_t ) );
|
||||||
|
@@ -2062,7 +2059,8 @@
|
||||||
|
int
|
||||||
|
chain_initialize( void )
|
||||||
|
{
|
||||||
|
- int rc;
|
||||||
|
+ int rc;
|
||||||
|
+ const char *text;
|
||||||
|
|
||||||
|
/* Make sure we don't exceed the bits reserved for userland */
|
||||||
|
config_check_userland( CH_LAST );
|
||||||
|
Index: servers/slapd/config.h
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/config.h,v
|
||||||
|
retrieving revision 1.50
|
||||||
|
retrieving revision 1.51
|
||||||
|
diff -u -r1.50 -r1.51
|
||||||
|
--- servers/slapd/config.h 18 Feb 2008 22:11:12 -0000 1.50
|
||||||
|
+++ servers/slapd/config.h 12 Oct 2008 18:20:46 -0000 1.51
|
||||||
|
@@ -201,6 +201,8 @@
|
||||||
|
extern slap_verbmasks *slap_ldap_response_code;
|
||||||
|
extern int slap_ldap_response_code_register( struct berval *bv, int err );
|
||||||
|
|
||||||
|
+extern ConfigTable olcDatabaseDummy[];
|
||||||
|
+
|
||||||
|
LDAP_END_DECL
|
||||||
|
|
||||||
|
#endif /* CONFIG_H */
|
||||||
|
Index: servers/slapd/bconfig.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/bconfig.c,v
|
||||||
|
retrieving revision 1.348
|
||||||
|
retrieving revision 1.350
|
||||||
|
diff -u -r1.348 -r1.350
|
||||||
|
--- servers/slapd/bconfig.c 29 Sep 2008 20:08:29 -0000 1.348
|
||||||
|
+++ servers/slapd/bconfig.c 12 Oct 2008 18:20:46 -0000 1.350
|
||||||
|
@@ -696,6 +696,15 @@
|
||||||
|
NULL, NULL, NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* Need to no-op this keyword for dynamic config */
|
||||||
|
+ConfigTable olcDatabaseDummy[] = {
|
||||||
|
+ { "", "", 0, 0, 0, ARG_IGNORED,
|
||||||
|
+ NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
|
||||||
|
+ "DESC 'The backend type for a database instance' "
|
||||||
|
+ "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
|
||||||
|
+ { NULL, NULL, 0, 0, 0, ARG_IGNORED }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
/* Routines to check if a child can be added to this type */
|
||||||
|
static ConfigLDAPadd cfAddSchema, cfAddInclude, cfAddDatabase,
|
||||||
|
cfAddBackend, cfAddModule, cfAddOverlay;
|
||||||
|
@@ -3253,7 +3262,7 @@
|
||||||
|
ConfigArgs *ca;
|
||||||
|
Entry *frontend;
|
||||||
|
Entry *config;
|
||||||
|
- int got_frontend;
|
||||||
|
+ int got_frontend;
|
||||||
|
int got_config;
|
||||||
|
} setup_cookie;
|
||||||
|
|
||||||
|
@@ -3262,15 +3271,18 @@
|
||||||
|
{
|
||||||
|
if ( rs->sr_type == REP_SEARCH ) {
|
||||||
|
setup_cookie *sc = op->o_callback->sc_private;
|
||||||
|
+ struct berval pdn;
|
||||||
|
|
||||||
|
sc->cfb->cb_got_ldif = 1;
|
||||||
|
/* Does the frontend exist? */
|
||||||
|
if ( !sc->got_frontend ) {
|
||||||
|
if ( !strncmp( rs->sr_entry->e_nname.bv_val,
|
||||||
|
- "olcDatabase", STRLENOF( "olcDatabase" ))) {
|
||||||
|
+ "olcDatabase", STRLENOF( "olcDatabase" )))
|
||||||
|
+ {
|
||||||
|
if ( strncmp( rs->sr_entry->e_nname.bv_val +
|
||||||
|
STRLENOF( "olcDatabase" ), "={-1}frontend",
|
||||||
|
- STRLENOF( "={-1}frontend" ))) {
|
||||||
|
+ STRLENOF( "={-1}frontend" )))
|
||||||
|
+ {
|
||||||
|
struct berval rdn;
|
||||||
|
int i = op->o_noop;
|
||||||
|
sc->ca->be = frontendDB;
|
||||||
|
@@ -3293,13 +3305,19 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ dnParent( &rs->sr_entry->e_nname, &pdn );
|
||||||
|
+
|
||||||
|
/* Does the configDB exist? */
|
||||||
|
if ( sc->got_frontend && !sc->got_config &&
|
||||||
|
!strncmp( rs->sr_entry->e_nname.bv_val,
|
||||||
|
- "olcDatabase", STRLENOF( "olcDatabase" ))) {
|
||||||
|
+ "olcDatabase", STRLENOF( "olcDatabase" )) &&
|
||||||
|
+ dn_match( &config_rdn, &pdn ) )
|
||||||
|
+ {
|
||||||
|
if ( strncmp( rs->sr_entry->e_nname.bv_val +
|
||||||
|
STRLENOF( "olcDatabase" ), "={0}config",
|
||||||
|
- STRLENOF( "={0}config" ))) {
|
||||||
|
+ STRLENOF( "={0}config" )))
|
||||||
|
+ {
|
||||||
|
struct berval rdn;
|
||||||
|
int i = op->o_noop;
|
||||||
|
sc->ca->be = LDAP_STAILQ_FIRST( &backendDB );
|
||||||
|
@@ -6466,6 +6484,9 @@
|
||||||
|
i = config_register_schema( ct, cf_ocs );
|
||||||
|
if ( i ) return i;
|
||||||
|
|
||||||
|
+ i = slap_str2ad( "olcDatabase", &olcDatabaseDummy[0].ad, &text );
|
||||||
|
+ if ( i ) return i;
|
||||||
|
+
|
||||||
|
/* setup olcRootPW to be base64-encoded when written in LDIF form;
|
||||||
|
* basically, we don't care if it fails */
|
||||||
|
i = slap_str2ad( "olcRootPW", &ad, &text );
|
138
slapo-chain-dangling-its5742.dif
Normal file
138
slapo-chain-dangling-its5742.dif
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
Index: servers/slapd/result.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/result.c,v
|
||||||
|
retrieving revision 1.316
|
||||||
|
retrieving revision 1.317
|
||||||
|
diff -u -r1.316 -r1.317
|
||||||
|
--- servers/slapd/result.c 13 Oct 2008 08:18:15 -0000 1.316
|
||||||
|
+++ servers/slapd/result.c 16 Oct 2008 22:03:17 -0000 1.317
|
||||||
|
@@ -1273,6 +1273,7 @@
|
||||||
|
BerElement *ber = (BerElement *) &berbuf;
|
||||||
|
int rc = 0;
|
||||||
|
int bytes;
|
||||||
|
+ char *edn = rs->sr_entry ? rs->sr_entry->e_name.bv_val : "(null)";
|
||||||
|
|
||||||
|
AttributeDescription *ad_ref = slap_schema.si_ad_ref;
|
||||||
|
AttributeDescription *ad_entry = slap_schema.si_ad_entry;
|
||||||
|
@@ -1287,7 +1288,7 @@
|
||||||
|
|
||||||
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
|
"=> send_search_reference: dn=\"%s\"\n",
|
||||||
|
- rs->sr_entry ? rs->sr_entry->e_name.bv_val : "(null)", 0, 0 );
|
||||||
|
+ edn, 0, 0 );
|
||||||
|
|
||||||
|
if ( rs->sr_entry && ! access_allowed( op, rs->sr_entry,
|
||||||
|
ad_entry, NULL, ACL_READ, NULL ) )
|
||||||
|
@@ -1313,7 +1314,7 @@
|
||||||
|
if( op->o_domain_scope ) {
|
||||||
|
Debug( LDAP_DEBUG_ANY,
|
||||||
|
"send_search_reference: domainScope control in (%s)\n",
|
||||||
|
- rs->sr_entry->e_dn, 0, 0 );
|
||||||
|
+ edn, 0, 0 );
|
||||||
|
rc = 0;
|
||||||
|
goto rel;
|
||||||
|
}
|
||||||
|
@@ -1321,7 +1322,7 @@
|
||||||
|
if( rs->sr_ref == NULL ) {
|
||||||
|
Debug( LDAP_DEBUG_ANY,
|
||||||
|
"send_search_reference: null ref in (%s)\n",
|
||||||
|
- rs->sr_entry ? rs->sr_entry->e_dn : "(null)", 0, 0 );
|
||||||
|
+ edn, 0, 0 );
|
||||||
|
rc = 1;
|
||||||
|
goto rel;
|
||||||
|
}
|
||||||
|
@@ -1371,6 +1372,7 @@
|
||||||
|
|
||||||
|
rc = 0;
|
||||||
|
if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
|
||||||
|
+ assert( rs->sr_entry != NULL );
|
||||||
|
be_entry_release_rw( op, rs->sr_entry, 0 );
|
||||||
|
rs->sr_flags ^= REP_ENTRY_MUSTRELEASE;
|
||||||
|
rs->sr_entry = NULL;
|
||||||
|
@@ -1520,8 +1522,8 @@
|
||||||
|
LDAPControl c;
|
||||||
|
Operation myop;
|
||||||
|
|
||||||
|
- Debug( LDAP_DEBUG_ANY, "slap_read_controls: (%s) %s\n",
|
||||||
|
- oid->bv_val, e->e_dn, 0 );
|
||||||
|
+ Debug( LDAP_DEBUG_ANY, "%s slap_read_controls: (%s) %s\n",
|
||||||
|
+ op->o_log_prefix, oid->bv_val, e->e_dn );
|
||||||
|
|
||||||
|
rs->sr_entry = e;
|
||||||
|
rs->sr_attrs = ( oid == &slap_pre_read_bv ) ?
|
||||||
|
Index: servers/slapd/back-ldap/chain.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldap/chain.c,v
|
||||||
|
retrieving revision 1.70
|
||||||
|
retrieving revision 1.71
|
||||||
|
diff -u -r1.70 -r1.71
|
||||||
|
--- servers/slapd/back-ldap/chain.c 12 Oct 2008 18:20:46 -0000 1.70
|
||||||
|
+++ servers/slapd/back-ldap/chain.c 16 Oct 2008 22:06:12 -0000 1.71
|
||||||
|
@@ -597,6 +597,8 @@
|
||||||
|
struct berval odn = op->o_req_dn,
|
||||||
|
ondn = op->o_req_ndn;
|
||||||
|
slap_response *save_response = op->o_callback->sc_response;
|
||||||
|
+ Entry *save_entry = rs->sr_entry;
|
||||||
|
+ slap_mask_t save_flags = rs->sr_flags;
|
||||||
|
|
||||||
|
int rc = LDAP_OTHER,
|
||||||
|
first_rc = -1;
|
||||||
|
@@ -761,7 +763,8 @@
|
||||||
|
op->o_req_ndn = ondn;
|
||||||
|
op->o_callback->sc_response = save_response;
|
||||||
|
rs->sr_type = REP_SEARCHREF;
|
||||||
|
- rs->sr_entry = NULL;
|
||||||
|
+ rs->sr_entry = save_entry;
|
||||||
|
+ rs->sr_flags = save_flags;
|
||||||
|
|
||||||
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
|
/* couldn't chase any of the referrals */
|
||||||
|
Index: tests/scripts/test032-chain
|
||||||
|
===================================================================
|
||||||
|
RCS file: /repo/OpenLDAP/pkg/ldap/tests/scripts/test032-chain,v
|
||||||
|
retrieving revision 1.13
|
||||||
|
retrieving revision 1.14
|
||||||
|
diff -u -r1.13 -r1.14
|
||||||
|
--- tests/scripts/test032-chain 7 Jan 2008 23:20:17 -0000 1.13
|
||||||
|
+++ tests/scripts/test032-chain 16 Oct 2008 22:07:15 -0000 1.14
|
||||||
|
@@ -128,7 +128,7 @@
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- echo "Reading the referral entry "ou=Other,$BASEDN" as anonymous on port $P..."
|
||||||
|
+ echo "Reading the referral entry \"ou=Other,$BASEDN\" as anonymous on port $P..."
|
||||||
|
$LDAPSEARCH -h $LOCALHOST -p $P -b "ou=Other,$BASEDN" -S "" \
|
||||||
|
> $SEARCHOUT 2>&1
|
||||||
|
|
||||||
|
@@ -304,6 +304,31 @@
|
||||||
|
exit $RC
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# ITS#57??
|
||||||
|
+$LDAPADD -h $LOCALHOST -p $PORT1 \
|
||||||
|
+ -D "$MANAGERDN" -w secret \
|
||||||
|
+ >> $TESTOUT 2>&1 \
|
||||||
|
+ << EOMODS
|
||||||
|
+dn: ou=Can't Contact,dc=example,dc=com
|
||||||
|
+changetype: add
|
||||||
|
+objectclass: referral
|
||||||
|
+objectclass: extensibleobject
|
||||||
|
+ou: Can't Contact
|
||||||
|
+# invalid URI to test broken connectivity handling (search only)
|
||||||
|
+ref: ${URI3}ou=Can't%20Contact,dc=example,dc=com
|
||||||
|
+EOMODS
|
||||||
|
+
|
||||||
|
+echo "Reading the referral entry \"ou=Can't Contact,$BASEDN\" as anonymous on port $PORT1..."
|
||||||
|
+$LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -S "" "(cn=Can't Contact)" \
|
||||||
|
+ > $SEARCHOUT 2>&1
|
||||||
|
+
|
||||||
|
+RC=$?
|
||||||
|
+if test $RC != 0 ; then
|
||||||
|
+ echo "ldapsearch failed ($RC)!"
|
||||||
|
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||||
|
+ exit $RC
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||||
|
|
||||||
|
echo ">>>>> Test succeeded"
|
Loading…
Reference in New Issue
Block a user