diff options
author | Matthieu Patou <mat@matws.net> | 2011-10-14 11:22:20 +0200 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2011-10-16 00:01:36 +0200 |
commit | a1767f74afc0037d188a8ed578ce68a7e3cd07f3 (patch) | |
tree | b597f6cd903e932258e2d74299ed251399edb4c2 /source4/scripting | |
parent | e02f9510d039242ac012658aa67e235c68d45fe1 (diff) | |
download | samba-a1767f74afc0037d188a8ed578ce68a7e3cd07f3.tar.gz samba-a1767f74afc0037d188a8ed578ce68a7e3cd07f3.tar.bz2 samba-a1767f74afc0037d188a8ed578ce68a7e3cd07f3.zip |
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.
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/netcmd/domain.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index ce9d7d8682..3906d69a2d 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -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") |