diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-08-19 12:30:19 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-19 16:35:09 +1000 |
commit | 0ffb4e6f6f1db61bf4f2ec73c1cad5e102787f67 (patch) | |
tree | 3acc09f66c9ff49cb3fc569907277de75aa40920 | |
parent | dadaca01d2c4ac272b3f684eaee85cf5800f5f69 (diff) | |
download | samba-0ffb4e6f6f1db61bf4f2ec73c1cad5e102787f67.tar.gz samba-0ffb4e6f6f1db61bf4f2ec73c1cad5e102787f67.tar.bz2 samba-0ffb4e6f6f1db61bf4f2ec73c1cad5e102787f67.zip |
python-samba3: Secrets file loaded from private dir, not lib dir
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/scripting/python/samba/samba3/__init__.py | 8 | ||||
-rw-r--r-- | source4/scripting/python/samba/upgrade.py | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/samba3/__init__.py b/source4/scripting/python/samba/samba3/__init__.py index f5dde44aa0..385d9331ec 100644 --- a/source4/scripting/python/samba/samba3/__init__.py +++ b/source4/scripting/python/samba/samba3/__init__.py @@ -754,12 +754,18 @@ class Samba3(object): self.libdir = libdir self.lp = ParamFile() self.lp.read(self.smbconfpath) + self.privatedir = self.lp.get("private dir") or libdir def libdir_path(self, path): if path[0] == "/" or path[0] == ".": return path return os.path.join(self.libdir, path) + def privatedir_path(self, path): + if path[0] == "/" or path[0] == ".": + return path + return os.path.join(self.privatedir, path) + def get_conf(self): return self.lp @@ -789,7 +795,7 @@ class Samba3(object): return Registry(self.libdir_path("registry.tdb")) def get_secrets_db(self): - return SecretsDatabase(self.libdir_path("secrets.tdb")) + return SecretsDatabase(self.privatedir_path("secrets.tdb")) def get_shareinfo_db(self): return ShareInfoDatabase(self.libdir_path("share_info.tdb")) diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py index 38e6ed87bb..6226681830 100644 --- a/source4/scripting/python/samba/upgrade.py +++ b/source4/scripting/python/samba/upgrade.py @@ -535,7 +535,7 @@ def upgrade_from_samba3(samba3, logger, session_info, smbconf, targetdir): # We must close the direct pytdb database before the C code loads it secrets_db.close() - passdb.set_secrets_dir(samba3.libdir) + passdb.set_secrets_dir(samba3.privatedir) # Get domain sid try: |