s4:group policies - upcase directory names of default group policies
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Sat, 12 Sep 2009 08:58:56 +0000 (10:58 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Sat, 12 Sep 2009 09:12:22 +0000 (11:12 +0200)
The directory names (MACHINE, USER) are upcased to help locating the default
group policies under the SYSVOL dir (the additional ones have only the first
letter upcased of those directory names).

source4/scripting/python/samba/provision.py

index 19149e92e26cc3a902c6ec6062dabefb2d7a2395..e21a3cbee17e26730fd1ddc491c18aa89c297994 100644 (file)
@@ -1040,10 +1040,14 @@ def provision(setup_dir, message, session_info,
     if domainsid is None:
         domainsid = security.random_sid()
 
+    # create/adapt the group policy GUIDs
     if policyguid is None:
         policyguid = str(uuid.uuid4())
+    policyguid = policyguid.upper()
     if policyguid_dc is None:
         policyguid_dc = str(uuid.uuid4())
+    policyguid_dc = policyguid_dc.upper()
+
     if adminpass is None:
         adminpass = glue.generate_random_str(12)
     if krbtgtpass is None:
@@ -1191,16 +1195,16 @@ def provision(setup_dir, message, session_info,
         os.makedirs(policy_path, 0755)
         open(os.path.join(policy_path, "GPT.INI"), 'w').write(
                                    "[General]\r\nVersion=65544")
-        os.makedirs(os.path.join(policy_path, "Machine"), 0755)
-        os.makedirs(os.path.join(policy_path, "User"), 0755)
+        os.makedirs(os.path.join(policy_path, "MACHINE"), 0755)
+        os.makedirs(os.path.join(policy_path, "USER"), 0755)
 
         policy_path_dc = os.path.join(paths.sysvol, names.dnsdomain, "Policies",
                                    "{" + policyguid_dc + "}")
         os.makedirs(policy_path_dc, 0755)
         open(os.path.join(policy_path_dc, "GPT.INI"), 'w').write(
                                    "[General]\r\nVersion=2")
-        os.makedirs(os.path.join(policy_path_dc, "Machine"), 0755)
-        os.makedirs(os.path.join(policy_path_dc, "User"), 0755)
+        os.makedirs(os.path.join(policy_path_dc, "MACHINE"), 0755)
+        os.makedirs(os.path.join(policy_path_dc, "USER"), 0755)
 
         if not os.path.isdir(paths.netlogon):
             os.makedirs(paths.netlogon, 0755)