libgpo: fix the build of gpext plugins.
[ira/wip.git] / libgpo / gpo_fetch.c
index 7e41812789e4d292c7f83637fb6168e0130489e9..06c730cfa38404bc697bcbe247e85db0d0f5f7d0 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "system/filesys.h"
 #include "../libgpo/gpo.h"
+#include "../libgpo/gpo_ini.h"
 
 #if _SAMBA_BUILD_ == 4
 #include "param/param.h"
@@ -29,7 +30,8 @@
 #include "libcli/raw/libcliraw.h"
 #include "libcli/libcli_proto.h"
 #include "libgpo/ads_convenience.h"
-#include "libgpo/gpo.h"
+#include "libgpo/gpo_s4.h"
+#include "lib/util/util.h"
 #endif
 
 /****************************************************************
@@ -112,7 +114,7 @@ static NTSTATUS gpo_prepare_local_store(TALLOC_CTX *mem_ctx,
        }
 
        while (next_token_talloc(mem_ctx, &unix_path, &tok, "/")) {
-               if (strequal(tok, cache_dir)) {
+               if (strequal(tok, GPO_CACHE_DIR)) {
                        break;
                }
        }
@@ -210,6 +212,7 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
 
 
        result = gpo_connect_server(ads, lp_ctx, server, service, &cli);
+       NT_STATUS_NOT_OK_RETURN(result);
 
 
        result = gpo_prepare_local_store(mem_ctx, cache_dir, unix_path);