Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Barchiesi
OpenLDAP
Commits
fb4d5151
Commit
fb4d5151
authored
12 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Factor out common attrs from main and target
parent
54de37c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/back-meta/back-meta.h
+51
-39
51 additions, 39 deletions
servers/slapd/back-meta/back-meta.h
servers/slapd/back-meta/config.c
+195
-303
195 additions, 303 deletions
servers/slapd/back-meta/config.c
with
246 additions
and
342 deletions
servers/slapd/back-meta/back-meta.h
+
51
−
39
View file @
fb4d5151
...
...
@@ -276,6 +276,37 @@ typedef struct metasubtree_t {
struct
metasubtree_t
*
ms_next
;
}
metasubtree_t
;
typedef
struct
metacommon_t
{
int
mc_version
;
int
mc_nretries
;
#define META_RETRY_UNDEFINED (-2)
#define META_RETRY_FOREVER (-1)
#define META_RETRY_NEVER (0)
#define META_RETRY_DEFAULT (10)
unsigned
mc_flags
;
#define META_BACK_CMN_ISSET(mc,f) ( ( (mc)->mc_flags & (f) ) == (f) )
#define META_BACK_CMN_QUARANTINE(mc) META_BACK_CMN_ISSET( (mc), LDAP_BACK_F_QUARANTINE )
#ifdef SLAPD_META_CLIENT_PR
/*
* client-side paged results:
* -1: accept unsolicited paged results responses
* 0: off
* >0: always request paged results with size == mt_ps
*/
#define META_CLIENT_PR_DISABLE (0)
#define META_CLIENT_PR_ACCEPT_UNSOLICITED (-1)
ber_int_t
mc_ps
;
#endif
/* SLAPD_META_CLIENT_PR */
slap_retry_info_t
mc_quarantine
;
time_t
mc_network_timeout
;
struct
timeval
mc_bind_timeout
;
#define META_BIND_TIMEOUT LDAP_BACK_RESULT_UTIMEOUT
time_t
mc_timeout
[
SLAP_OP_LAST
];
}
metacommon_t
;
typedef
struct
metatarget_t
{
char
*
mt_uri
;
ldap_pvt_thread_mutex_t
mt_uri_mutex
;
...
...
@@ -315,19 +346,21 @@ typedef struct metatarget_t {
#define mt_idassert_flags mt_idassert.si_flags
#define mt_idassert_authz mt_idassert.si_authz
int
mt_nretries
;
#define META_RETRY_UNDEFINED (-2)
#define META_RETRY_FOREVER (-1)
#define META_RETRY_NEVER (0)
#define META_RETRY_DEFAULT (10)
struct
ldaprwmap
mt_rwmap
;
sig_atomic_t
mt_isquarantined
;
slap_retry_info_t
mt_quarantine
;
ldap_pvt_thread_mutex_t
mt_quarantine_mutex
;
unsigned
mt_flags
;
metacommon_t
mt_mc
;
#define mt_nretries mt_mc.mc_nretries
#define mt_flags mt_mc.mc_flags
#define mt_version mt_mc.mc_version
#define mt_ps mt_mc.mc_ps
#define mt_network_timeout mt_mc.mc_network_timeout
#define mt_bind_timeout mt_mc.mc_bind_timeout
#define mt_timeout mt_mc.mc_timeout
#define mt_quarantine mt_mc.mc_quarantine
#define META_BACK_TGT_ISSET(mt,f) ( ( (mt)->mt_flags & (f) ) == (f) )
#define META_BACK_TGT_ISMASK(mt,m,f) ( ( (mt)->mt_flags & (m) ) == (f) )
...
...
@@ -358,24 +391,6 @@ typedef struct metatarget_t {
slap_mask_t
mt_rep_flags
;
int
mt_version
;
#ifdef SLAPD_META_CLIENT_PR
/*
* client-side paged results:
* -1: accept unsolicited paged results responses
* 0: off
* >0: always request paged results with size == mt_ps
*/
#define META_CLIENT_PR_DISABLE (0)
#define META_CLIENT_PR_ACCEPT_UNSOLICITED (-1)
ber_int_t
mt_ps
;
#endif
/* SLAPD_META_CLIENT_PR */
time_t
mt_network_timeout
;
struct
timeval
mt_bind_timeout
;
#define META_BIND_TIMEOUT LDAP_BACK_RESULT_UTIMEOUT
time_t
mt_timeout
[
SLAP_OP_LAST
];
}
metatarget_t
;
typedef
struct
metadncache_t
{
...
...
@@ -401,7 +416,15 @@ typedef struct metainfo_t {
int
mi_ntargets
;
int
mi_defaulttarget
;
#define META_DEFAULT_TARGET_NONE (-1)
int
mi_nretries
;
#define mi_nretries mi_mc.mc_nretries
#define mi_flags mi_mc.mc_flags
#define mi_version mi_mc.mc_version
#define mi_ps mi_mc.mc_ps
#define mi_network_timeout mi_mc.mc_network_timeout
#define mi_bind_timeout mi_mc.mc_bind_timeout
#define mi_timeout mi_mc.mc_timeout
#define mi_quarantine mi_mc.mc_quarantine
metatarget_t
**
mi_targets
;
metacandidates_t
*
mi_candidates
;
...
...
@@ -421,11 +444,9 @@ typedef struct metainfo_t {
int
mi_conn_priv_max
;
/* NOTE: quarantine uses the connection mutex */
slap_retry_info_t
mi_quarantine
;
meta_back_quarantine_f
mi_quarantine_f
;
void
*
mi_quarantine_p
;
unsigned
mi_flags
;
#define li_flags mi_flags
/* uses flags as defined in <back-ldap/back-ldap.h> */
#define META_BACK_F_ONERR_STOP (0x01000000U)
...
...
@@ -447,19 +468,10 @@ typedef struct metainfo_t {
#define META_BACK_QUARANTINE(mi) LDAP_BACK_ISSET( (mi), LDAP_BACK_F_QUARANTINE )
int
mi_version
;
#ifdef SLAPD_META_CLIENT_PR
ber_int_t
mi_ps
;
#endif
/* SLAPD_META_CLIENT_PR */
time_t
mi_network_timeout
;
time_t
mi_conn_ttl
;
time_t
mi_idle_timeout
;
struct
timeval
mi_bind_timeout
;
time_t
mi_timeout
[
SLAP_OP_LAST
];
metacommon_t
mi_mc
;
ldap_extra_t
*
mi_ldap_extra
;
}
metainfo_t
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-meta/config.c
+
195
−
303
View file @
fb4d5151
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment