s4:kdc: Pass down the task to get access to model_ops for kpasswd server
authorAndreas Schneider <asn@samba.org>
Thu, 19 Oct 2017 15:32:15 +0000 (17:32 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 27 Oct 2017 09:29:12 +0000 (11:29 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/kdc/kdc-service-mit.c

index 53997d5473d471cb52efd74202f6720371e3b24f..e5b20ffb52393006dbedac2a5d469d1a8ff87c67 100644 (file)
@@ -58,7 +58,6 @@ static NTSTATUS startup_kpasswd_server(TALLOC_CTX *mem_ctx,
                                       struct loadparm_context *lp_ctx,
                                       struct interface *ifaces)
 {
-       const struct model_ops *model_ops;
        int num_interfaces;
        int i;
        TALLOC_CTX *tmp_ctx;
@@ -92,7 +91,7 @@ static NTSTATUS startup_kpasswd_server(TALLOC_CTX *mem_ctx,
 
                for (i = 0; wcard[i] != NULL; i++) {
                        status = kdc_add_socket(kdc,
-                                               model_ops,
+                                               kdc->task->model_ops,
                                                "kpasswd",
                                                wcard[i],
                                                kpasswd_port,
@@ -116,7 +115,7 @@ static NTSTATUS startup_kpasswd_server(TALLOC_CTX *mem_ctx,
                const char *address = talloc_strdup(tmp_ctx, iface_list_n_ip(ifaces, i));
 
                status = kdc_add_socket(kdc,
-                                       model_ops,
+                                       kdc->task->model_ops,
                                        "kpasswd",
                                        address,
                                        kpasswd_port,