Rework samdb handling for 'netlogon' packets.
[kai/samba.git] / source4 / cldap_server / cldap_server.c
index 58e9e2d89b53af56db9002fac2d322e749af27e5..310fb564e0fc5068d8845bf158d09e20d44fcac9 100644 (file)
@@ -187,7 +187,7 @@ static void cldapd_task_init(struct task_server *task)
        }
 
        cldapd->task = task;
        }
 
        cldapd->task = task;
-       cldapd->samctx = samdb_connect(cldapd, task->event_ctx, task->lp_ctx, anonymous_session(cldapd, task->event_ctx, task->lp_ctx));
+       cldapd->samctx = samdb_connect(cldapd, task->event_ctx, task->lp_ctx, system_session(cldapd, task->lp_ctx));
        if (cldapd->samctx == NULL) {
                task_server_terminate(task, "cldapd failed to open samdb");
                return;
        if (cldapd->samctx == NULL) {
                task_server_terminate(task, "cldapd failed to open samdb");
                return;