summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-06-18 14:55:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-06-19 14:36:06 +1000
commitdcc9ae69953ac03f539a4be8f52ee1c13cfe985d (patch)
tree42e106d4ab45d7bc037a341f0d8addb502b1ad70
parent5c19c60c5741196fc0a2b8db901e1be02139ae4e (diff)
downloadsamba-dcc9ae69953ac03f539a4be8f52ee1c13cfe985d.tar.gz
s4:ldapsrv Place the 'privilaged' ldapi socket under an #ifdef
This makes it clear to our users that this particular implementation isn't final (all parties are agreed that an EXTERNAL bind is the right way to do this, but it has not been implemented yet). Andrew Bartlett
-rw-r--r--source4/ldap_server/ldap_server.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 36e8de68832..9611ad67339 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -455,6 +455,10 @@ static const struct stream_server_ops ldap_stream_nonpriv_ops = {
.send_handler = ldapsrv_send,
};
+/* The feature removed behind an #ifdef until we can do it properly
+ * with an EXTERNAL bind. */
+
+#ifdef WITH_LDAPI_PRIV_SOCKET
static void ldapsrv_accept_priv(struct stream_connection *c)
{
struct ldapsrv_service *ldapsrv_service = talloc_get_type_abort(
@@ -479,6 +483,7 @@ static const struct stream_server_ops ldap_stream_priv_ops = {
.send_handler = ldapsrv_send,
};
+#endif
/*
add a socket address to the list of events, one event per port
*/
@@ -549,7 +554,10 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
*/
static void ldapsrv_task_init(struct task_server *task)
{
- char *ldapi_path, *priv_dir;
+ char *ldapi_path;
+#ifdef WITH_LDAPI_PRIV_SOCKET
+ char *priv_dir;
+#endif
struct ldapsrv_service *ldap_service;
NTSTATUS status;
const struct model_ops *model_ops;
@@ -619,6 +627,7 @@ static void ldapsrv_task_init(struct task_server *task)
ldapi_path, nt_errstr(status)));
}
+#ifdef WITH_LDAPI_PRIV_SOCKET
priv_dir = private_path(ldap_service, task->lp_ctx, "ldap_priv");
if (priv_dir == NULL) {
goto failed;
@@ -649,6 +658,7 @@ static void ldapsrv_task_init(struct task_server *task)
ldapi_path, nt_errstr(status)));
}
+#endif
return;
failed: