*/
#define TALLOC_DEPRECATED 1
#include "includes.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#if _SAMBA_BUILD_ == 4
#include "system/filesys.h"
-#include "auth/auth.h"
+#include "librpc/gen_ndr/ndr_misc.h"
+#include "../librpc/gen_ndr/ndr_security.h"
#include "../libgpo/gpo.h"
-#include "../lib/talloc/talloc.h"
-#include "source4/libgpo/ads_convenience.h"
-#endif
+#include "../libcli/security/security.h"
#undef strdup
#if 0
ADS_STATUS gpo_process_a_gpo(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx,
- const NT_USER_TOKEN *token,
+ const struct security_token *token,
struct registry_key *root_key,
struct GROUP_POLICY_OBJECT *gpo,
const char *extension_guid_filter,
static ADS_STATUS gpo_process_gpo_list_by_ext(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx,
- const NT_USER_TOKEN *token,
+ const struct security_token *token,
struct registry_key *root_key,
struct GROUP_POLICY_OBJECT *gpo_list,
const char *extensions_guid,
ADS_STATUS gpo_process_gpo_list(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx,
- const NT_USER_TOKEN *token,
+ const struct security_token *token,
struct GROUP_POLICY_OBJECT *gpo_list,
const char *extensions_guid_filter,
uint32_t flags)
TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const char *dn,
- NT_USER_TOKEN **token)
+ struct security_token **token)
{
- NT_USER_TOKEN *ad_token = NULL;
+ 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);
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;
}