1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

s3-provision: cope with the policy directory already existing

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell
2010-08-03 17:15:10 +10:00
parent fd59a7c4af
commit ec3ed2898f

View File

@ -949,11 +949,16 @@ def getpolicypath(sysvolpath, dnsdomain, guid):
return policy_path
def create_gpo_struct(policy_path):
os.makedirs(policy_path, 0755)
if not os.path.exists(policy_path):
os.makedirs(policy_path, 0755)
open(os.path.join(policy_path, "GPT.INI"), 'w').write(
"[General]\r\nVersion=65543")
os.makedirs(os.path.join(policy_path, "MACHINE"), 0755)
os.makedirs(os.path.join(policy_path, "USER"), 0755)
p = os.path.join(policy_path, "MACHINE")
if not os.path.exists(p):
os.makedirs(p, 0755)
p = os.path.join(policy_path, "USER")
if not os.path.exists(p):
os.makedirs(p, 0755)
def setup_gpo(sysvolpath, dnsdomain, policyguid, policyguid_dc):