build: Remove _SAMBA_BUILD == 4 from libgpo
authorAndrew Bartlett <abartlet@samba.org>
Wed, 6 Jul 2011 02:39:34 +0000 (12:39 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 6 Jul 2011 02:59:49 +0000 (12:59 +1000)
This code has no hope of building against the samba4 libs (it has been
disabled for a very long time, and files referenced don't exist etc),
and with the common build there simply is no need.

Andrew Bartlett

libgpo/gpext/gpext.c
libgpo/gpo.h
libgpo/gpo_fetch.c
libgpo/gpo_ldap.c
libgpo/gpo_sec.c
libgpo/gpo_util.c

index 42ab6223312cddd5d79f82fb88663b3f379afb53..1f86b5f5d71d4cfdccc09899293ac629d46521d4 100644 (file)
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "lib/util/dlinklist.h"
 #include "../libcli/registry/util_reg.h"
-#if _SAMBA_BUILD_ == 3
 #include "libgpo/gpo_proto.h"
 #include "registry.h"
 #include "registry/reg_api.h"
-#endif
 
 static struct gp_extension *extensions = NULL;
 
index e6443825eceec4d542871f28d87b132430bf6007..62e9091156e28a07997f0860ff270a6e5fc8cf14 100644 (file)
 #ifndef __GPO_H__
 #define __GPO_H__
 
-#if _SAMBA_BUILD_ == 4
-#include "source4/libgpo/ads_convenience.h"
-#else
 struct loadparm_context;
 #include "ads.h"
-#endif
 
 enum GPO_LINK_TYPE {
        GP_LINK_UNKOWN  = 0,
index cae11d5c0d2a11a9e79758cd545589705167491b..4e895bf544efbcabe991a492b155d3f93d468387 100644 (file)
 #include "../libgpo/gpo.h"
 #include "../libgpo/gpo_ini.h"
 
-#if _SAMBA_BUILD_ == 4
-#include "param/param.h"
-#include "libcli/resolve/resolve.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"
 #include "libsmb/libsmb.h"
-#endif
 
 /****************************************************************
  explode the GPO CIFS URI into their components
@@ -82,11 +70,7 @@ NTSTATUS gpo_explode_filesyspath(TALLOC_CTX *mem_ctx,
                                        file_sys_path)) == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
-#if _SAMBA_BUILD_ == 4
-       path = string_sub_talloc(mem_ctx, path, "\\", "/");
-#else
        path = talloc_string_sub(mem_ctx, path, "\\", "/");
-#endif
        if (!path) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -138,10 +122,8 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct loadparm_context *lp_
                                    const char *server, const char *service, void *ret_cli)
 {
        NTSTATUS result;
-#if _SAMBA_BUILD_ == 3
        struct cli_state *cli;
 
-
        result = cli_full_connection(&cli,
                        lp_netbios_name(),
                        server,
@@ -159,32 +141,6 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct loadparm_context *lp_
                return result;
        }
        *(struct cli_state **) ret_cli = cli;
-#else
-       struct smbcli_state *cli = NULL;
-       struct smbcli_options options;
-       struct smbcli_session_options session_options;
-
-       lp_smbcli_options(lp_ctx, &options);
-       lp_smbcli_session_options(lp_ctx, &session_options);
-
-       result = smbcli_full_connection(NULL, &cli,
-                       server,
-                       NULL, service,
-                       NULL /*devtype*/, NULL /* socket options */,
-                       ads->credentials,
-                       lp_resolve_context(lp_ctx),
-                       tevent_context_init(ads),
-                       &options,
-                       &session_options,
-                       lp_iconv_handle(lp_ctx),
-                       lp_gensec_settings(ads, lp_ctx));
-       if (!NT_STATUS_IS_OK(result)) {
-               DEBUG(10,("failed to connect: %s\n",
-                               nt_errstr(result)));
-               return result;
-       }
-       *(struct smbcli_state **) ret_cli = cli;
-#endif
        return NT_STATUS_OK;
 }
 
@@ -201,11 +157,7 @@ NTSTATUS gpo_fetch_files(TALLOC_CTX *mem_ctx,
        NTSTATUS result;
        char *server, *service, *nt_path, *unix_path;
        char *nt_ini_path, *unix_ini_path;
-#if _SAMBA_BUILD_ == 3
        struct cli_state *cli;
-#else
-       struct smbcli_state *cli;
-#endif
 
 
        result = gpo_explode_filesyspath(mem_ctx, cache_dir, gpo->file_sys_path,
index 9d984b5b9903ae6a4aebd3e2eaaa07e7682c7ec0..d46c48f8f3e52e7121a5ecd49ea4808eb7d8d142 100644 (file)
 #include "includes.h"
 #include "libgpo/gpo.h"
 #include "auth.h"
-#if _SAMBA_BUILD_ == 4
-#include "libgpo/gpo_s4.h"
-#include "source4/libgpo/ads_convenience.h"
-#endif
 #include "../libcli/security/security.h"
 
 /****************************************************************
index 05b011b81d3890cccb0763670f06cbb8d201c4a6..c27ca55f977fd6368879d4bb04d191051b4831b0 100644 (file)
 #include "../libgpo/gpo.h"
 #include "auth.h"
 #include "../librpc/ndr/libndr.h"
-#if _SAMBA_BUILD_ == 4
-#include "libgpo/ads_convenience.h"
-#include "librpc/gen_ndr/security.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "../libcli/security/secace.h"
-#endif
 
 /****************************************************************
 ****************************************************************/
index 553402a4274fd581e5a48457d3722a4800acd8dd..ca529f8af6cd37ffa588e43396edc95f063527ef 100644 (file)
 #include "../librpc/gen_ndr/ndr_security.h"
 #include "../libgpo/gpo.h"
 #include "../libcli/security/security.h"
-#if _SAMBA_BUILD_ == 4
-#include "auth/auth.h"
-#include <talloc.h>
-#include "source4/libgpo/ads_convenience.h"
-#endif
 #undef strdup
 
 #if 0
@@ -845,11 +840,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 {
        struct security_token *ad_token = NULL;
        ADS_STATUS status;
-#if _SAMBA_BUILD_ == 4
-       struct auth_session_info *info;
-#else
        NTSTATUS ntstatus;
-#endif
 
 #ifndef HAVE_ADS
        return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
@@ -858,15 +849,10 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
        if (!ADS_ERR_OK(status)) {
                return status;
        }
-#if _SAMBA_BUILD_ == 4
-       info = system_session(mem_ctx, lp_ctx);
-       *token = info->security_token;
-#else
        ntstatus = merge_nt_token(mem_ctx, ad_token, get_system_token(),
                                  token);
        if (!NT_STATUS_IS_OK(ntstatus)) {
                return ADS_ERROR_NT(ntstatus);
        }
-#endif
        return ADS_SUCCESS;
 }