summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-16 19:01:15 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-18 05:39:01 +0200
commit538893d183e967448df5aeb41b99a8af5116c5b7 (patch)
treeadab6cb9c906f37e8af056df06f63552bdfa2781 /source4/scripting
parent628a24172f3bb759324582c439ba9d081aa4d392 (diff)
downloadsamba-538893d183e967448df5aeb41b99a8af5116c5b7.tar.gz
samba-538893d183e967448df5aeb41b99a8af5116c5b7.tar.bz2
samba-538893d183e967448df5aeb41b99a8af5116c5b7.zip
s3fs: Use xattr_tdb format for xattr storage
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Apr 18 05:39:01 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision/__init__.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 6bb09b7fe9..04cafa9c97 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -587,7 +587,7 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
def make_smbconf(smbconf, hostname, domain, realm, targetdir,
- serverrole=None, sid_generator=None, eadb=False, lp=None,
+ serverrole=None, sid_generator=None, eadb=False, use_ntvfs=False, lp=None,
global_param=None):
"""Create a new smb.conf file based on a couple of basic settings.
"""
@@ -623,12 +623,19 @@ def make_smbconf(smbconf, hostname, domain, realm, targetdir,
#Load non-existant file
if os.path.exists(smbconf):
lp.load(smbconf)
- if eadb and not lp.get("posix:eadb"):
- if targetdir is not None:
- privdir = os.path.join(targetdir, "private")
- else:
- privdir = lp.get("private dir")
- lp.set("posix:eadb", os.path.abspath(os.path.join(privdir, "eadb.tdb")))
+ if eadb:
+ if use_ntvfs and not lp.get("posix:eadb"):
+ if targetdir is not None:
+ privdir = os.path.join(targetdir, "private")
+ else:
+ privdir = lp.get("private dir")
+ lp.set("posix:eadb", os.path.abspath(os.path.join(privdir, "eadb.tdb")))
+ elif not use_ntvfs and not lp.get("xattr_tdb:file"):
+ if targetdir is not None:
+ statedir = os.path.join(targetdir, "state")
+ else:
+ statedir = lp.get("state dir")
+ lp.set("xattr_tdb:file", os.path.abspath(os.path.join(statedir, "xattr.tdb")))
if global_param is not None:
for ent in global_param:
@@ -1665,12 +1672,12 @@ def provision(logger, session_info, credentials, smbconf=None,
if data is None or data == "":
make_smbconf(smbconf, hostname, domain, realm,
targetdir, serverrole=serverrole,
- sid_generator=sid_generator, eadb=useeadb,
+ sid_generator=sid_generator, eadb=useeadb, use_ntvfs=use_ntvfs,
lp=lp, global_param=global_param)
else:
make_smbconf(smbconf, hostname, domain, realm, targetdir,
serverrole=serverrole, sid_generator=sid_generator,
- eadb=useeadb, lp=lp, global_param=global_param)
+ eadb=useeadb, use_ntvfs=use_ntvfs, lp=lp, global_param=global_param)
if lp is None:
lp = samba.param.LoadParm()