mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
Use consistent function names with the standard Python uuid module that is available in >= 2.4.
(This used to be commit 60d458e3195eef6baf655fee0da7c3f68517e8e6)
This commit is contained in:
parent
0b5a16abe0
commit
5319d9620b
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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 }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user