provision: Initialize uninitialized variables if "targetdir" is not
authorKai Blin <kai@samba.org>
Thu, 27 Mar 2008 16:49:56 +0000 (17:49 +0100)
committerKai Blin <kai@samba.org>
Thu, 27 Mar 2008 16:49:56 +0000 (17:49 +0100)
defined and there is no smb.conf file

source/scripting/python/samba/provision.py

index 47d00f8..e97ce69 100644 (file)
@@ -373,7 +373,10 @@ def load_or_make_smbconf(smbconf, setup_path, hostname, domain, realm, serverrol
             lockdir_line = "lock dir = " + os.path.abspath(targetdir)
 
             default_lp.set("lock dir", os.path.abspath(targetdir))
-            
+        else:
+           privatedir_line = "private_dir = " + default_lp.get("private dir")
+           lockdir_line = "lock dir = " + default_lp.get("lock dir")
+
         sysvol = os.path.join(default_lp.get("lock dir"), "sysvol")
         netlogon = os.path.join(sysvol, realm.lower(), "scripts")