1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

s4:provision Generate a random objectGUID for each schema record

This is needed to then create extended DNs with GUID attributes in
them, when importing from the LDIF

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2009-11-16 18:45:21 +11:00
parent 39b8f31d66
commit 0238147a85

View File

@ -7,6 +7,7 @@
import re
import base64
import uuid
bitFields = {}
@ -227,6 +228,7 @@ def __transform_entry(entry, objectClass):
entry.insert(0, ["dn", "CN=%s,${SCHEMADN}" % cn])
entry.insert(1, ["objectClass", ["top", objectClass]])
entry.insert(2, ["cn", cn])
entry.insert(2, ["objectGUID", str(uuid.uuid4())])
for l in entry:
key = l[0].lower()