mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s4:ldap_server: Store whether an LDAP connection is over ldapi
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15634 Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
c2378d0c6f
commit
c63cabf1e0
@ -300,7 +300,8 @@ static void ldapsrv_accept_tls_done(struct tevent_req *subreq);
|
|||||||
*/
|
*/
|
||||||
static void ldapsrv_accept(struct stream_connection *c,
|
static void ldapsrv_accept(struct stream_connection *c,
|
||||||
struct auth_session_info *session_info,
|
struct auth_session_info *session_info,
|
||||||
bool is_privileged)
|
bool is_privileged,
|
||||||
|
bool is_ldapi)
|
||||||
{
|
{
|
||||||
struct ldapsrv_service *ldapsrv_service =
|
struct ldapsrv_service *ldapsrv_service =
|
||||||
talloc_get_type(c->private_data, struct ldapsrv_service);
|
talloc_get_type(c->private_data, struct ldapsrv_service);
|
||||||
@ -319,6 +320,7 @@ static void ldapsrv_accept(struct stream_connection *c,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
conn->is_privileged = is_privileged;
|
conn->is_privileged = is_privileged;
|
||||||
|
conn->is_ldapi = is_ldapi;
|
||||||
|
|
||||||
conn->sockets.send_queue = tevent_queue_create(conn, "ldapsrv send queue");
|
conn->sockets.send_queue = tevent_queue_create(conn, "ldapsrv send queue");
|
||||||
if (conn->sockets.send_queue == NULL) {
|
if (conn->sockets.send_queue == NULL) {
|
||||||
@ -1129,7 +1131,7 @@ static void ldapsrv_accept_nonpriv(struct stream_connection *c)
|
|||||||
"session info");
|
"session info");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ldapsrv_accept(c, session_info, false);
|
ldapsrv_accept(c, session_info, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct stream_server_ops ldap_stream_nonpriv_ops = {
|
static const struct stream_server_ops ldap_stream_nonpriv_ops = {
|
||||||
@ -1153,7 +1155,7 @@ static void ldapsrv_accept_nonpriv_ldapi(struct stream_connection *c)
|
|||||||
"session info");
|
"session info");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ldapsrv_accept(c, session_info, false);
|
ldapsrv_accept(c, session_info, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct stream_server_ops ldapi_stream_nonpriv_ops = {
|
static const struct stream_server_ops ldapi_stream_nonpriv_ops = {
|
||||||
@ -1181,7 +1183,7 @@ static void ldapsrv_accept_priv_ldapi(struct stream_connection *c)
|
|||||||
"session info");
|
"session info");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ldapsrv_accept(c, session_info, true);
|
ldapsrv_accept(c, session_info, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct stream_server_ops ldapi_stream_priv_ops = {
|
static const struct stream_server_ops ldapi_stream_priv_ops = {
|
||||||
|
@ -50,6 +50,7 @@ struct ldapsrv_connection {
|
|||||||
|
|
||||||
bool global_catalog;
|
bool global_catalog;
|
||||||
bool is_privileged;
|
bool is_privileged;
|
||||||
|
bool is_ldapi;
|
||||||
enum ldap_server_require_strong_auth require_strong_auth;
|
enum ldap_server_require_strong_auth require_strong_auth;
|
||||||
bool authz_logged;
|
bool authz_logged;
|
||||||
enum ldap_server_referral_scheme referral_scheme;
|
enum ldap_server_referral_scheme referral_scheme;
|
||||||
|
Loading…
Reference in New Issue
Block a user