source4 smbd test: prefork process restart
[bbaumbach/samba-autobuild/.git] / libgpo / gpo_fetch.c
index 9fdff7c2f2b49d0640e04c7111b12fc9440ed0fb..3740d4e4b577a249521a0f42e8007631e4de5052 100644 (file)
@@ -133,7 +133,7 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads,
                        ads->auth.password,
                        CLI_FULL_CONNECTION_USE_KERBEROS |
                        CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
-                       Undefined);
+                       SMB_SIGNING_REQUIRED);
        if (!NT_STATUS_IS_OK(result)) {
                DEBUG(10,("check_refresh_gpo: "
                                "failed to connect: %s\n",
@@ -151,12 +151,12 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads,
 NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
                          ADS_STRUCT *ads,
                          const char *cache_dir,
-                        struct GROUP_POLICY_OBJECT *gpo)
+                        const struct GROUP_POLICY_OBJECT *gpo)
 {
        NTSTATUS result;
        char *server, *service, *nt_path, *unix_path;
        char *nt_ini_path, *unix_ini_path;
-       struct cli_state *cli;
+       struct cli_state *cli = NULL;
 
 
        result = gpo_explode_filesyspath(mem_ctx, cache_dir, gpo->file_sys_path,
@@ -166,7 +166,7 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
 
        /* for now reuse the existing ds connection */
 
-       result = gpo_connect_server(ads, ads->server.ldap_server, service, &cli);
+       result = gpo_connect_server(ads, server, service, &cli);
        NT_STATUS_NOT_OK_RETURN(result);
 
        result = gpo_prepare_local_store(mem_ctx, cache_dir, unix_path);