From 0238147a855c65ea0a81b0a945ae8ffd9b260c75 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 16 Nov 2009 18:45:21 +1100 Subject: [PATCH] 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 --- source4/scripting/python/samba/ms_schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/scripting/python/samba/ms_schema.py b/source4/scripting/python/samba/ms_schema.py index a0abc337ce4..a4eed581c63 100644 --- a/source4/scripting/python/samba/ms_schema.py +++ b/source4/scripting/python/samba/ms_schema.py @@ -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() -- 2.34.1