[PATCH] provision: Fix an error with eadb when using not default install dir and running as a non root user

Matthieu Patou mat at matws.net
Mon Feb 8 05:36:07 MST 2010


---
 source4/scripting/python/samba/provision.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 58c172f..1e9d3a2 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -463,7 +463,11 @@ def make_smbconf(smbconf, setup_path, hostname, domain, realm, serverrole,
     if os.path.exists(smbconf):
         default_lp.load(smbconf)
     if eadb:
-        posixeadb_line = "posix:eadb = " + os.path.abspath(os.path.join(os.path.join(targetdir, "private"),"eadb.tdb"))
+        if targetdir is not None:
+            privdir = os.path.join(targetdir, "private")
+        else:
+            privdir = default_lp.get("private dir")
+        posixeadb_line = "posix:eadb = " + os.path.abspath(os.path.join(privdir,"eadb.tdb"))
     else:
         posixeadb_line = ""
 
-- 
1.6.3.3


--------------010603080407050200030503--


More information about the samba-technical mailing list