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
orbea -
OpenLDAP
Commits
f8ad9016
Commit
f8ad9016
authored
Nov 05, 2007
by
Howard Chu
Browse files
ITS#5209 sasl_host may be different from global_host
parent
005209bf
Changes
5
Hide whitespace changes
Inline
Side-by-side
servers/slapd/bconfig.c
View file @
f8ad9016
...
...
@@ -508,7 +508,7 @@ static ConfigTable config_back_cf_table[] = {
&
config_generic
,
NULL
,
NULL
,
NULL
},
{
"sasl-host"
,
"host"
,
2
,
2
,
0
,
#ifdef HAVE_CYRUS_SASL
ARG_STRING
|
ARG_UNIQUE
,
&
globa
l_host
,
ARG_STRING
|
ARG_UNIQUE
,
&
sas
l_host
,
#else
ARG_IGNORED
,
NULL
,
#endif
...
...
servers/slapd/config.c
View file @
f8ad9016
...
...
@@ -64,6 +64,7 @@ int global_gentlehup = 0;
int
global_idletimeout
=
0
;
char
*
global_host
=
NULL
;
char
*
global_realm
=
NULL
;
char
*
sasl_host
=
NULL
;
char
**
default_passwd_hash
=
NULL
;
struct
berval
default_search_base
=
BER_BVNULL
;
struct
berval
default_search_nbase
=
BER_BVNULL
;
...
...
servers/slapd/main.c
View file @
f8ad9016
...
...
@@ -832,6 +832,12 @@ unhandled_option:;
}
#endif
#ifdef HAVE_CYRUS_SASL
if
(
sasl_host
==
NULL
)
{
sasl_host
=
ch_strdup
(
global_host
);
}
#endif
(
void
)
SIGNAL
(
LDAP_SIGUSR1
,
slap_sig_wake
);
(
void
)
SIGNAL
(
LDAP_SIGUSR2
,
slap_sig_shutdown
);
...
...
servers/slapd/proto-slap.h
View file @
f8ad9016
...
...
@@ -1879,6 +1879,7 @@ LDAP_SLAPD_V (int) global_gentlehup;
LDAP_SLAPD_V
(
int
)
global_idletimeout
;
LDAP_SLAPD_V
(
char
*
)
global_host
;
LDAP_SLAPD_V
(
char
*
)
global_realm
;
LDAP_SLAPD_V
(
char
*
)
sasl_host
;
LDAP_SLAPD_V
(
char
**
)
default_passwd_hash
;
LDAP_SLAPD_V
(
int
)
lber_debug
;
LDAP_SLAPD_V
(
int
)
ldap_syslog
;
...
...
servers/slapd/sasl.c
View file @
f8ad9016
...
...
@@ -1279,8 +1279,8 @@ int slap_sasl_destroy( void )
#ifdef HAVE_CYRUS_SASL
sasl_done
();
#endif
free
(
globa
l_host
);
globa
l_host
=
NULL
;
free
(
sas
l_host
);
sas
l_host
=
NULL
;
return
0
;
}
...
...
@@ -1389,7 +1389,7 @@ int slap_sasl_open( Connection *conn, int reopen )
ipremoteport
=
slap_sasl_peer2ipport
(
&
conn
->
c_peer_name
);
}
sc
=
sasl_server_new
(
"ldap"
,
globa
l_host
,
global_realm
,
sc
=
sasl_server_new
(
"ldap"
,
sas
l_host
,
global_realm
,
iplocalport
,
ipremoteport
,
session_callbacks
,
SASL_SUCCESS_DATA
,
&
ctx
);
if
(
iplocalport
!=
NULL
)
{
ch_free
(
iplocalport
);
...
...
@@ -1398,7 +1398,7 @@ int slap_sasl_open( Connection *conn, int reopen )
ch_free
(
ipremoteport
);
}
#else
sc
=
sasl_server_new
(
"ldap"
,
globa
l_host
,
global_realm
,
sc
=
sasl_server_new
(
"ldap"
,
sas
l_host
,
global_realm
,
session_callbacks
,
SASL_SECURITY_LAYER
,
&
ctx
);
#endif
...
...
Write
Preview
Markdown
is supported
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