From: Andrew Bartlett Date: Tue, 21 Aug 2012 09:58:18 +0000 (+1000) Subject: s4-provision: pass use_ntvfs from C wrappers and set to true in tests/vampire X-Git-Tag: samba-4.0.0beta7~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5c2747cad0f9bbb69cceb4b90aab20546a5cf66;p=thirdparty%2Fsamba.git s4-provision: pass use_ntvfs from C wrappers and set to true in tests/vampire None of these cases need the complexity of the s3fs backend. Andrew Bartlett --- diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index f06e4a4cb2e..48fdc894718 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -162,7 +162,7 @@ NTSTATUS libnet_vampire_cb_prepare_db(void *private_data, settings.server_dn_str = p->dest_dsa->server_dn_str; settings.machine_password = generate_random_password(s, 16, 255); settings.targetdir = s->targetdir; - + settings.use_ntvfs = true; status = provision_bare(s, s->lp_ctx, &settings, &result); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/param/provision.c b/source4/param/provision.c index 766babead46..298e1c3bfa5 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -167,6 +167,8 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, PyDict_SetItemString(parameters, "debuglevel", PyInt_FromLong(DEBUGLEVEL)); + PyDict_SetItemString(parameters, "use_ntvfs", PyInt_FromLong(settings->use_ntvfs)); + py_result = PyEval_CallObjectWithKeywords(provision_fn, NULL, parameters); Py_DECREF(parameters); diff --git a/source4/param/provision.h b/source4/param/provision.h index fc0287831c9..2f6f582e5d5 100644 --- a/source4/param/provision.h +++ b/source4/param/provision.h @@ -35,6 +35,7 @@ struct provision_settings { const char *ntds_dn_str; const char *machine_password; const char *targetdir; + bool use_ntvfs; }; /* FIXME: Rename this to hostconfig ? */ diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index 6834d40eb48..02ebf683102 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -1938,7 +1938,7 @@ def provision_become_dc(smbconf=None, targetdir=None, policyguid_dc=None, invocationid=None, machinepass=None, dnspass=None, dns_backend=None, root=None, nobody=None, users=None, wheel=None, backup=None, serverrole=None, ldap_backend=None, - ldap_backend_type=None, sitename=None, debuglevel=1): + ldap_backend_type=None, sitename=None, debuglevel=1, use_ntvfs=False): logger = logging.getLogger("provision") samba.set_debug_level(debuglevel) @@ -1949,7 +1949,7 @@ def provision_become_dc(smbconf=None, targetdir=None, configdn=configdn, serverdn=serverdn, domain=domain, hostname=hostname, hostip=None, domainsid=domainsid, machinepass=machinepass, serverrole="active directory domain controller", - sitename=sitename, dns_backend=dns_backend, dnspass=dnspass) + sitename=sitename, dns_backend=dns_backend, dnspass=dnspass, use_ntvfs=use_ntvfs) res.lp.set("debuglevel", str(debuglevel)) return res diff --git a/source4/torture/local/torture.c b/source4/torture/local/torture.c index 0eb69a5db89..65062042dc1 100644 --- a/source4/torture/local/torture.c +++ b/source4/torture/local/torture.c @@ -61,6 +61,7 @@ static bool test_provision(struct torture_context *tctx) settings->netbios_name = "torture"; settings->ntds_dn_str = NULL; settings->machine_password = "geheim"; + settings->use_ntvfs = true; status = provision_bare(settings, tctx->lp_ctx, settings, &result);