Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2019-01-22 05:48:27 +0300
committerCasey Deccio <casey@deccio.net>2019-01-22 05:48:27 +0300
commit67e09bdd00037b724496f59c68658a42bdd9373d (patch)
tree6da2c7cfc6f66ef55139acd26666ad8e178dab14
parent6f1b4701823363742d841b8931f0f96a9917429e (diff)
Try /var/tmp before attempting /tmp
This is supposed to help with default /usr/sbin/named permissions for Debian with AppArmor.
-rw-r--r--dnsviz/commands/probe.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/dnsviz/commands/probe.py b/dnsviz/commands/probe.py
index ea93e53..eaadd78 100644
--- a/dnsviz/commands/probe.py
+++ b/dnsviz/commands/probe.py
@@ -563,6 +563,10 @@ def _cleanup_process(working_dir, pid):
shutil.rmtree(working_dir)
def _serve_zone(zone, zone_file, port):
+ try:
+ tmpdir = tempfile.mkdtemp(prefix='DNS_dnsviz', dir='/var/tmp/')
+ except OSError:
+ tmpdir = tempfile.mkdtemp(prefix='DNS_dnsviz')
tmpdir = tempfile.mkdtemp(prefix='dnsviz')
pid = None