summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-11 03:31:26 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-11 03:31:26 +0200
commit5319d9620b9ef68b3687d76aeaba5fa5d5c57a18 (patch)
treee82b70c82944de072575b42cd932fcfac772fcbb /source4/scripting
parent0b5a16abe03ee582e3d2d7bf41ed5a0f224f95cb (diff)
downloadsamba-5319d9620b9ef68b3687d76aeaba5fa5d5c57a18.tar.gz
samba-5319d9620b9ef68b3687d76aeaba5fa5d5c57a18.tar.bz2
samba-5319d9620b9ef68b3687d76aeaba5fa5d5c57a18.zip
Use consistent function names with the standard Python uuid module that is available in >= 2.4.
(This used to be commit 60d458e3195eef6baf655fee0da7c3f68517e8e6)
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 }
};