summaryrefslogtreecommitdiffstats
path: root/source4/kdc/kdc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-06-05 12:32:30 -0700
committerJeremy Allison <jra@samba.org>2014-06-07 01:01:43 +0200
commit463311422ca1caad2e228deb630e9d12e212fae1 (patch)
tree324fd1fe5b7cc2b1413879ea01d94b77f27c8ef1 /source4/kdc/kdc.c
parent7091755c5834f74170b26a6f1e59c98a9051260d (diff)
downloadsamba-463311422ca1caad2e228deb630e9d12e212fae1.tar.gz
samba-463311422ca1caad2e228deb630e9d12e212fae1.tar.xz
samba-463311422ca1caad2e228deb630e9d12e212fae1.zip
s3/s4: smbd, rpc, ldap, cldap, kdc services.
Allow us to start if we bind to *either* :: or 0.0.0.0. Allows us to cope with systems configured as only IPv4 or only IPv6. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com> Reviewed-By: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 7 01:01:44 CEST 2014 on sn-devel-104
Diffstat (limited to 'source4/kdc/kdc.c')
-rw-r--r--source4/kdc/kdc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 4a16f7e5e0..bb476e1e65 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -733,6 +733,7 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c
/* if we are allowing incoming packets from any address, then
we need to bind to the wildcard address */
if (!lpcfg_bind_interfaces_only(lp_ctx)) {
+ int num_binds = 0;
char **wcard = iface_list_wildcard(kdc);
NT_STATUS_HAVE_NO_MEMORY(wcard);
for (i=0; wcard[i]; i++) {
@@ -740,17 +741,24 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c
status = kdc_add_socket(kdc, model_ops,
"kdc", wcard[i], kdc_port,
kdc_process, false);
- NT_STATUS_NOT_OK_RETURN(status);
+ if (NT_STATUS_IS_OK(status)) {
+ num_binds++;
+ }
}
if (kpasswd_port) {
status = kdc_add_socket(kdc, model_ops,
"kpasswd", wcard[i], kpasswd_port,
kpasswdd_process, false);
- NT_STATUS_NOT_OK_RETURN(status);
+ if (NT_STATUS_IS_OK(status)) {
+ num_binds++;
+ }
}
}
talloc_free(wcard);
+ if (num_binds == 0) {
+ return NT_STATUS_INVALID_PARAMETER_MIX;
+ }
done_wildcard = true;
}