summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-06-28 09:57:33 +0200
committerStefan Metzmacher <metze@samba.org>2010-06-28 09:58:13 +0200
commitbdfba236e9aebd6c277851efdb7ee57620810282 (patch)
tree15f71a445ef66670f84f1dbcc03953a36e631b5e /source4
parent5a18fc2b2a520977440e301d816bdf11ac966bc2 (diff)
downloadsamba-bdfba236e9aebd6c277851efdb7ee57620810282.tar.gz
samba-bdfba236e9aebd6c277851efdb7ee57620810282.tar.bz2
samba-bdfba236e9aebd6c277851efdb7ee57620810282.zip
s4:ldap_server: don't start if we can't bind to port 389
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/ldap_server/ldap_server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 00698eec46..49d3d58edf 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -506,6 +506,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("ldapsrv failed to bind to %s:%u - %s\n",
address, port, nt_errstr(status)));
+ return status;
}
if (tls_support(ldap_service->tls_params)) {
@@ -520,6 +521,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("ldapsrv failed to bind to %s:%u - %s\n",
address, port, nt_errstr(status)));
+ return status;
}
}
@@ -541,6 +543,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("ldapsrv failed to bind to %s:%u - %s\n",
address, port, nt_errstr(status)));
+ return status;
}
}
@@ -548,7 +551,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
* connect again on each incoming LDAP connection */
talloc_unlink(ldap_service, ldb);
- return status;
+ return NT_STATUS_OK;
}
/*