summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision.py4
-rw-r--r--source4/scripting/python/samba/tests/samdb.py8
-rw-r--r--source4/scripting/python/uuidmodule.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 0e8840646c..60fa22e6c4 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -910,7 +910,7 @@ def provision(setup_dir, message, session_info,
domainsid = security.Sid(domainsid)
if policyguid is None:
- policyguid = uuid.random()
+ policyguid = uuid.uuid4()
if adminpass is None:
adminpass = misc.random_password(12)
if krbtgtpass is None:
@@ -960,7 +960,7 @@ def provision(setup_dir, message, session_info,
assert serverrole in ("domain controller", "member server", "standalone")
if invocationid is None and serverrole == "domain controller":
- invocationid = uuid.random()
+ invocationid = uuid.uuid4()
if not os.path.exists(paths.private_dir):
os.mkdir(paths.private_dir)
diff --git a/source4/scripting/python/samba/tests/samdb.py b/source4/scripting/python/samba/tests/samdb.py
index 0e175bf936..9da3358527 100644
--- a/source4/scripting/python/samba/tests/samdb.py
+++ b/source4/scripting/python/samba/tests/samdb.py
@@ -29,18 +29,18 @@ import uuid
class SamDBTestCase(TestCaseInTempDir):
def setUp(self):
super(SamDBTestCase, self).setUp()
- invocationid = uuid.random()
+ invocationid = uuid.uuid4()
domaindn = "DC=COM,DC=EXAMPLE"
self.domaindn = domaindn
configdn = "CN=Configuration," + domaindn
schemadn = "CN=Schema," + configdn
- domainguid = uuid.random()
- policyguid = uuid.random()
+ domainguid = uuid.uuid4()
+ policyguid = uuid.uuid4()
setup_path = lambda x: os.path.join("setup", x)
creds = Credentials()
creds.set_anonymous()
domainsid = security.random_sid()
- hostguid = uuid.random()
+ hostguid = uuid.uuid4()
path = os.path.join(self.tempdir, "samdb.ldb")
self.samdb = setup_samdb(path, setup_path, system_session(), creds,
cmdline_loadparm, schemadn, configdn,
diff --git a/source4/scripting/python/uuidmodule.c b/source4/scripting/python/uuidmodule.c
index 18cfb6ce32..98ef9adaa9 100644
--- a/source4/scripting/python/uuidmodule.c
+++ b/source4/scripting/python/uuidmodule.c
@@ -46,7 +46,7 @@ static PyObject *uuid_random(PyObject *self, PyObject *args)
}
static PyMethodDef methods[] = {
- { "random", (PyCFunction)uuid_random, METH_VARARGS, NULL},
+ { "uuid4", (PyCFunction)uuid_random, METH_VARARGS, NULL},
{ NULL, NULL }
};