s4/libpolicy: Install header file.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 21 Aug 2011 00:24:12 +0000 (02:24 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 21 Aug 2011 01:22:05 +0000 (03:22 +0200)
source4/lib/policy/gp_filesys.c
source4/lib/policy/gp_ldap.c
source4/lib/policy/policy.h
source4/lib/policy/wscript_build

index 6e0cbedf5967abed57bb01f67b4e985ccc190a1e..55180cb78ed03ce7c436a58d5a1c158bb67509b9 100644 (file)
@@ -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,
index de56e4c5d2d00981174a7979138ee630f7ba36cd..c390be2ad3d0f490c3f445127d22c79bf9f9fffa 100644 (file)
@@ -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);
index e6ce15c9b8441c4094dd0740cebf209e83e52ef2..fd26e59f0843a729f71e79fb33e361a954085b07 100644 (file)
 
 #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 {
index 3896357a53b0799acb856c21f74a8ad01d1ae2d5..b8ba6384e43b1d0f5d971a07556415815e1c3c18 100644 (file)
@@ -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',