r25938: We don't need the CLDAP server unless we are a DC.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 13 Nov 2007 21:26:24 +0000 (22:26 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:45:10 +0000 (05:45 +0100)
Andrew Bartlett

source/cldap_server/cldap_server.c

index 466444ace81b0e420930212c42f087b57aa01454..454beb3ae228b3c52e363376dcbb866be1500e96 100644 (file)
@@ -159,6 +159,18 @@ static void cldapd_task_init(struct task_server *task)
                return;
        }
 
+       switch (lp_server_role(global_loadparm)) {
+       case ROLE_STANDALONE:
+               task_server_terminate(task, "cldap_server: no CLDAP server required in standalone configuration");
+               return;
+       case ROLE_DOMAIN_MEMBER:
+               task_server_terminate(task, "cldap_server: no CLDAP server required in member server configuration");
+               return;
+       case ROLE_DOMAIN_CONTROLLER:
+               /* Yes, we want an CLDAP server */
+               break;
+       }
+
        task_server_set_title(task, "task[cldapd]");
 
        cldapd = talloc(task, struct cldapd_server);