lpcfg_smbcli_options(gp_ctx->lp_ctx, &options);
lpcfg_smbcli_session_options(gp_ctx->lp_ctx, &session_options);
-
return smbcli_full_connection(gp_ctx,
&gp_ctx->cli,
- gp_ctx->active_dc.name,
+ gp_ctx->active_dc->name,
lpcfg_smb_ports(gp_ctx->lp_ctx),
"sysvol",
NULL,
return NT_STATUS_UNSUCCESSFUL;
}
-
*gp_ctx = talloc_zero(mem_ctx, struct gp_context);
NT_STATUS_HAVE_NO_MEMORY(gp_ctx);
(*gp_ctx)->credentials = credentials;
(*gp_ctx)->ev_ctx = ev_ctx;
(*gp_ctx)->ldb_ctx = ldb_ctx;
- (*gp_ctx)->active_dc = io->out.dcs[0];
+ (*gp_ctx)->active_dc = talloc_reference(*gp_ctx, &io->out.dcs[0]);
/* We don't need to keep the libnet context */
talloc_free(net_ctx);
#ifndef __POLICY_H__
#define __POLICY_H__
-#include "libcli/libcli.h"
#define GPLINK_OPT_DISABLE (1 << 0)
#define GPLINK_OPT_ENFORCE (1 << 1)
-
#define GPO_FLAG_USER_DISABLE (1 << 0)
#define GPO_FLAG_MACHINE_DISABLE (1 << 1)
struct security_token;
+struct nbt_dc_name;
enum gpo_inheritance {
GPO_INHERIT = 0,
struct cli_credentials *credentials;
struct tevent_context *ev_ctx;
struct smbcli_state *cli;
- struct nbt_dc_name active_dc;
+ struct nbt_dc_name *active_dc;
};
struct gp_object {
pc_files='samba-policy.pc',
public_deps='ldb samba-net',
vnum='0.0.1',
- pyembed=True
+ pyembed=True,
+ public_headers='policy.h'
)
bld.SAMBA_PYTHON('py_policy',