s4-provision: pass use_ntvfs from C wrappers and set to true in tests/vampire
authorAndrew Bartlett <abartlet@samba.org>
Tue, 21 Aug 2012 09:58:18 +0000 (19:58 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 21 Aug 2012 23:31:57 +0000 (01:31 +0200)
None of these cases need the complexity of the s3fs backend.

Andrew Bartlett

source4/libnet/libnet_vampire.c
source4/param/provision.c
source4/param/provision.h
source4/scripting/python/samba/provision/__init__.py
source4/torture/local/torture.c

index f06e4a4cb2e025172647844c2be9ab616c371959..48fdc894718127680b1982850e87e4f83ef5b209 100644 (file)
@@ -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)) {
index 766babead460fcce5bc50fc392f4c8968ff99953..298e1c3bfa58130190947307ff2f75039e1f847f 100644 (file)
@@ -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);
index fc0287831c9f5478d0b46708e7287c00ccb49c40..2f6f582e5d55d24466947d786b2dd2904c2039c4 100644 (file)
@@ -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 ? */
index 6834d40eb48000eb1e5df9f29899152cb28298e1..02ebf683102a55ff8a63cb86072bdd70ed62c603 100644 (file)
@@ -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
 
index 0eb69a5db89eb2289bb9e8e1b44bf0f152f5726d..65062042dc192c9167e9e838d10339bb5a3a02d7 100644 (file)
@@ -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);