summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-08-21 02:24:12 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-08-21 03:22:05 +0200
commitc0fe5e095df4b39e7b048c289e8e46de2b836dad (patch)
treee058403192e42af20b7117006ecd8fa156644529 /source4/lib
parent12e1fdf0899c8f9176f4a7e789faa2758c4eaa70 (diff)
downloadsamba-c0fe5e095df4b39e7b048c289e8e46de2b836dad.tar.gz
samba-c0fe5e095df4b39e7b048c289e8e46de2b836dad.tar.bz2
samba-c0fe5e095df4b39e7b048c289e8e46de2b836dad.zip
s4/libpolicy: Install header file.
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/policy/gp_filesys.c3
-rw-r--r--source4/lib/policy/gp_ldap.c3
-rw-r--r--source4/lib/policy/policy.h5
-rw-r--r--source4/lib/policy/wscript_build3
4 files changed, 6 insertions, 8 deletions
diff --git a/source4/lib/policy/gp_filesys.c b/source4/lib/policy/gp_filesys.c
index 6e0cbedf59..55180cb78e 100644
--- a/source4/lib/policy/gp_filesys.c
+++ b/source4/lib/policy/gp_filesys.c
@@ -164,10 +164,9 @@ static NTSTATUS gp_cli_connect(struct gp_context *gp_ctx)
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,
diff --git a/source4/lib/policy/gp_ldap.c b/source4/lib/policy/gp_ldap.c
index de56e4c5d2..c390be2ad3 100644
--- a/source4/lib/policy/gp_ldap.c
+++ b/source4/lib/policy/gp_ldap.c
@@ -177,7 +177,6 @@ NTSTATUS gp_init(TALLOC_CTX *mem_ctx,
return NT_STATUS_UNSUCCESSFUL;
}
-
*gp_ctx = talloc_zero(mem_ctx, struct gp_context);
NT_STATUS_HAVE_NO_MEMORY(gp_ctx);
@@ -185,7 +184,7 @@ NTSTATUS gp_init(TALLOC_CTX *mem_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);
diff --git a/source4/lib/policy/policy.h b/source4/lib/policy/policy.h
index e6ce15c9b8..fd26e59f08 100644
--- a/source4/lib/policy/policy.h
+++ b/source4/lib/policy/policy.h
@@ -20,16 +20,15 @@
#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,
@@ -42,7 +41,7 @@ struct gp_context {
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 {
diff --git a/source4/lib/policy/wscript_build b/source4/lib/policy/wscript_build
index 3896357a53..b8ba6384e4 100644
--- a/source4/lib/policy/wscript_build
+++ b/source4/lib/policy/wscript_build
@@ -5,7 +5,8 @@ bld.SAMBA_LIBRARY('samba-policy',
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',