Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
271c3232
Commit
271c3232
authored
Oct 25, 2001
by
Pierangelo Masarati
Browse files
Fixes ITS#1385
parent
79f76c76
Changes
4
Hide whitespace changes
Inline
Side-by-side
servers/slapd/config.c
View file @
271c3232
...
...
@@ -1691,22 +1691,21 @@ read_config( const char *fname )
}
else
{
for
(
i
=
1
;
i
<
cargc
;
i
++
)
{
if
(
strncasecmp
(
cargv
[
i
],
"suffix="
,
7
)
==
0
)
{
char
*
nsuffix
=
ch_strdup
(
cargv
[
i
]
+
7
);
if
(
dn_normalize
(
nsuffix
)
!=
NULL
)
{
if
(
select_backend
(
nsuffix
,
0
)
==
be
)
{
charray_add
(
&
be
->
be_replica
[
nr
]
->
ri_nsuffix
,
nsuffix
);
}
else
{
switch
(
add_replica_suffix
(
be
,
nr
,
cargv
[
i
]
+
7
)
)
{
case
1
:
#ifdef NEW_LOGGING
LDAP_LOG
((
"config"
,
LDAP_LEVEL_INFO
,
"%s: line %d: suffix
\"
%s
\"
in
\"
replica
\"
line is not valid for backend (ignored)
\n
"
,
fname
,
lineno
,
cargv
[
i
]
+
7
));
LDAP_LOG
((
"config"
,
LDAP_LEVEL_INFO
,
"%s: line %d: suffix
\"
%s
\"
in
\"
replica
\"
line is not valid for backend (ignored)
\n
"
,
fname
,
lineno
,
cargv
[
i
]
+
7
));
#else
Debug
(
LDAP_DEBUG_ANY
,
"%s: line %d: suffix
\"
%s
\"
in
\"
replica
\"
line is not valid for backend (ignored)
\n
"
,
fname
,
lineno
,
cargv
[
i
]
+
7
);
Debug
(
LDAP_DEBUG_ANY
,
"%s: line %d: suffix
\"
%s
\"
in
\"
replica
\"
line is not valid for backend (ignored)
\n
"
,
fname
,
lineno
,
cargv
[
i
]
+
7
);
#endif
}
}
else
{
break
;
case
2
:
#ifdef NEW_LOGGING
LDAP_LOG
((
"config"
,
LDAP_LEVEL_INFO
,
"%s: line %d: unable to normalize suffix in
\"
replica
\"
line (ignored)
\n
"
,
...
...
@@ -1716,8 +1715,8 @@ read_config( const char *fname )
"%s: line %d: unable to normalize suffix in
\"
replica
\"
line (ignored)
\n
"
,
fname
,
lineno
,
0
);
#endif
break
;
}
free
(
nsuffix
);
}
}
}
...
...
servers/slapd/proto-slap.h
View file @
271c3232
...
...
@@ -499,6 +499,7 @@ LDAP_SLAPD_F (char *) phonetic LDAP_P(( char *s ));
* repl.c
*/
LDAP_SLAPD_F
(
int
)
add_replica_info
LDAP_P
((
Backend
*
be
,
const
char
*
host
));
LDAP_SLAPD_F
(
int
)
add_replica_suffix
LDAP_P
((
Backend
*
be
,
int
nr
,
const
char
*
suffix
));
LDAP_SLAPD_F
(
void
)
replog
LDAP_P
((
Backend
*
be
,
Operation
*
op
,
char
*
dn
,
void
*
change
));
/*
...
...
servers/slapd/repl.c
View file @
271c3232
...
...
@@ -46,6 +46,30 @@ add_replica_info(
return
(
i
);
}
int
add_replica_suffix
(
Backend
*
be
,
int
nr
,
const
char
*
suffix
)
{
char
*
nsuffix
=
ch_strdup
(
suffix
);
int
rc
=
0
;
if
(
dn_normalize
(
nsuffix
)
!=
NULL
)
{
if
(
select_backend
(
nsuffix
,
0
)
==
be
)
{
charray_add
(
&
be
->
be_replica
[
nr
]
->
ri_nsuffix
,
nsuffix
);
}
else
{
rc
=
1
;
}
}
else
{
rc
=
2
;
}
free
(
nsuffix
);
return
(
rc
);
}
void
replog
(
Backend
*
be
,
...
...
servers/slapd/tools/mimic.c
View file @
271c3232
...
...
@@ -204,6 +204,11 @@ int add_replica_info( Backend *be, const char *host )
return
0
;
}
int
add_replica_suffix
(
Backend
*
be
,
int
nr
,
const
char
*
suffix
)
{
return
0
;
}
int
parse_limits
(
Backend
*
be
,
const
char
*
fname
,
int
lineno
,
int
argc
,
char
**
argv
)
{
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment