1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s4: check that the xattr are supported in the folder where we want to provision

By default we were checking this on the default folder for
tempfile.NamedTemporaryFile (usualy /tmp) but this folder can be mounted
on tmpfs (which didn't support xattr currently). Now we should check on
the filesystem where the provision will be done.
This commit is contained in:
Matthieu Patou
2011-10-14 11:22:20 +02:00
parent e02f9510d0
commit a1767f74af
2 changed files with 9 additions and 2 deletions

View File

@ -591,7 +591,10 @@ class cmd_domain_samba3upgrade(Command):
if use_xattrs == "yes":
eadb = False
elif use_xattrs == "auto" and not s3conf.get("posix:eadb"):
tmpfile = tempfile.NamedTemporaryFile()
if targetdir:
tmpfile = tempfile.NamedTemporaryFile(prefix=os.path.abspath(targetdir))
else:
tmpfile = tempfile.NamedTemporaryFile(prefix=os.path.abspath(os.path.dirname(lp.get("private dir"))))
try:
samba.ntacls.setntacl(lp, tmpfile.name,
"O:S-1-5-32G:S-1-5-32", "S-1-5-32", "native")