docs: Avoid mentioning a possibly misleading option.
[obnox/samba/samba-obnox.git] / libgpo / gpo_util.c
index 9e4687ddc95cf89edeedd32de5b9c296a43b5f68..cfb4512aefc2cf32146cd15242ea3590ca40d6ee 100644 (file)
  */
 #define TALLOC_DEPRECATED 1
 #include "includes.h"
+#include "system/filesys.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "../librpc/gen_ndr/ndr_security.h"
 #include "../libgpo/gpo.h"
 #include "../libcli/security/security.h"
-#if _SAMBA_BUILD_ == 4
-#include "system/filesys.h"
-#include "auth/auth.h"
-#include <talloc.h>
-#include "source4/libgpo/ads_convenience.h"
-#endif
 #undef strdup
 
 #if 0
@@ -843,30 +838,22 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
                                const char *dn,
                                struct security_token **token)
 {
+#ifdef HAVE_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);
-#endif
        status = ads_get_sid_token(ads, mem_ctx, dn, &ad_token);
        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;
+#else
+       return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
+#endif
 }