libgpo: pass cli_credentials instead of ADS_STRUCT to check_refresh_gpo*()
[metze/samba/wip.git] / libgpo / gpo_util.c
index 6ad5c3b7f2fadae197d717968c4211b84fb46d9c..0388775c8a82e82456f322afd0f4dd4b38b4e16e 100644 (file)
@@ -473,9 +473,9 @@ NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx,
  locally stored version. If not, fetch the required policy via CIFS
 ****************************************************************/
 
-NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
-                          TALLOC_CTX *mem_ctx,
-                           const char *cache_dir,
+NTSTATUS check_refresh_gpo(TALLOC_CTX *mem_ctx,
+                          struct cli_credentials *creds,
+                          const char *cache_dir,
                           uint32_t flags,
                           const struct GROUP_POLICY_OBJECT *gpo)
 {
@@ -515,7 +515,7 @@ NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
 
                DEBUG(1,("check_refresh_gpo: need to refresh GPO\n"));
 
-               result = gpo_fetch_files(mem_ctx, ads, cache_dir, gpo);
+               result = gpo_fetch_files(mem_ctx, creds, cache_dir, gpo);
                if (!NT_STATUS_IS_OK(result)) {
                        goto out;
                }
@@ -559,8 +559,8 @@ NTSTATUS check_refresh_gpo(ADS_STRUCT *ads,
  not, go and get each required GPO via CIFS
  ****************************************************************/
 
-NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
-                               TALLOC_CTX *mem_ctx,
+NTSTATUS check_refresh_gpo_list(TALLOC_CTX *mem_ctx,
+                               struct cli_credentials *creds,
                                const char *cache_dir,
                                uint32_t flags,
                                const struct GROUP_POLICY_OBJECT *gpo_list)
@@ -574,7 +574,7 @@ NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads,
 
        for (gpo = gpo_list; gpo; gpo = gpo->next) {
 
-               result = check_refresh_gpo(ads, mem_ctx, cache_dir, flags, gpo);
+               result = check_refresh_gpo(mem_ctx, creds, cache_dir, flags, gpo);
                if (!NT_STATUS_IS_OK(result)) {
                        goto out;
                }