s3:registry: move the reg_api prototypes to their own header.
[kai/samba.git] / libgpo / gpo_fetch.c
index a5714f7243a5a8ff7dbf1ea24488a265994bb499..ad6c2a80a0a1fd65c9a7f222537d4ee60c7f745f 100644 (file)
 #include "includes.h"
 #include "system/filesys.h"
 #include "../libgpo/gpo.h"
+#include "../libgpo/gpo_ini.h"
 
 #if _SAMBA_BUILD_ == 4
 #include "param/param.h"
 #include "libcli/resolve/resolve.h"
-#include "../lib/tevent/tevent.h"
+#include <tevent.h>
 #include "libcli/libcli.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/libcli_proto.h"
 #include "libgpo/ads_convenience.h"
 #include "libgpo/gpo_s4.h"
 #include "lib/util/util.h"
+#else
+#include "libgpo/gpo_proto.h"
 #endif
 
 /****************************************************************
@@ -113,7 +116,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;
                }
        }
@@ -211,6 +214,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);