s4-pyjoin: fill in the dns name in the python replication method
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Sep 2010 08:50:09 +0000 (18:50 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 15 Sep 2010 21:24:01 +0000 (07:24 +1000)
this is needed to get the repsFrom DNS entry right

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/repl/drepl_secret.c [new file with mode: 0644]
source4/libnet/libnet_vampire.c
source4/libnet/py_net.c

diff --git a/source4/dsdb/repl/drepl_secret.c b/source4/dsdb/repl/drepl_secret.c
new file mode 100644 (file)
index 0000000..8a405e7
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+   Unix SMB/CIFS mplementation.
+
+   DSDB replication service - repl secret handling
+
+   Copyright (C) Andrew Tridgell 2010
+   Copyright (C) Andrew Bartlett 2010
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "includes.h"
+#include "ldb_module.h"
+#include "dsdb/samdb/samdb.h"
+#include "smbd/service.h"
+#include "dsdb/repl/drepl_service.h"
+#include "param/param.h"
+
+
+/**
+ * Called when the auth code wants us to try and replicate
+ * a users secrets
+ */
+void drepl_repl_secret(struct dreplsrv_service *service,
+                      const char *user_dn)
+{
+       DEBUG(0,(__location__ ": got drepl_repl_secret with %s\n", user_dn));
+}
index 950698d053ebf56d0a3410b6b3849c6d48ebc1d1..1b6a8dd24407896a383fbeb353cb025bcfe1f13e 100644 (file)
@@ -106,6 +106,9 @@ void *libnet_vampire_replicate_init(TALLOC_CTX *mem_ctx,
        s->lp_ctx           = lp_ctx;
        s->provision_schema = dsdb_get_schema(s->ldb, s);
        s->schema           = s->provision_schema;
+       s->netbios_name     = lpcfg_netbios_name(lp_ctx);
+       s->domain_name      = lpcfg_workgroup(lp_ctx);
+       s->realm            = lpcfg_realm(lp_ctx);
 
        return s;
 }
index 8ff383036e2d2bdfdf29e3104029cb1b97464ab9..c460a06583ab5bc262c6da173f4aa99d999d8458 100644 (file)
@@ -376,6 +376,8 @@ static PyObject *py_net_replicate_init(py_net_Object *self, PyObject *args, PyOb
                return NULL;
        }
 
+       s->forest.dns_name = lpcfg_dnsdomain(lp);
+
        s->chunk.gensec_skey = &s->gensec_skey;
        s->chunk.partition = &s->partition;
        s->chunk.forest = &s->forest;