summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-02 14:21:52 -0700
committerAndrew Tridgell <tridge@samba.org>2010-10-02 21:11:52 -0700
commit29e1a847ddb28aee8ae04578b74cb8ab97427b96 (patch)
tree374f4efab999ef8e6f054e65d4cbf3a20aafaf4e
parent3bb59255bb5d0275242cc7c81b3935612b729354 (diff)
downloadsamba-29e1a847ddb28aee8ae04578b74cb8ab97427b96.tar.gz
samba-29e1a847ddb28aee8ae04578b74cb8ab97427b96.tar.bz2
samba-29e1a847ddb28aee8ae04578b74cb8ab97427b96.zip
s4-selftest: silence warnings about bind chown
-rw-r--r--source4/scripting/python/samba/provision.py4
-rw-r--r--source4/selftest/wscript2
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 79f180dfcb..96e7aa502f 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1672,7 +1672,7 @@ def provision(setup_dir, logger, session_info,
os.chmod(dns_keytab_path, 0640)
os.chown(dns_keytab_path, -1, paths.bind_gid)
except OSError:
- if os.environ.get('UID_WRAPPER'):
+ if not os.environ.has_key('SAMBA_SELFTEST'):
logger.info("Failed to chown %s to bind gid %u", dns_keytab_path,
paths.bind_gid)
@@ -1827,7 +1827,7 @@ def create_zone_file(lp, logger, paths, targetdir, setup_path, dnsdomain,
os.chmod(dns_dir, 0775)
os.chmod(paths.dns, 0664)
except OSError:
- if os.environ.get('UID_WRAPPER'):
+ if not os.environ.has_key('SAMBA_SELFTEST'):
logger.error("Failed to chown %s to bind gid %u" % (dns_dir, paths.bind_gid))
if targetdir is None:
diff --git a/source4/selftest/wscript b/source4/selftest/wscript
index 0d662c6456..4606c6681a 100644
--- a/source4/selftest/wscript
+++ b/source4/selftest/wscript
@@ -78,6 +78,8 @@ def cmd_testonly(opt):
print("ERROR: You must use --enable-selftest to enable selftest")
sys.exit(1)
+ os.environ['SAMBA_SELFTEST'] = '1'
+
env.TESTS = Options.options.TESTS
env.SUBUNIT_FORMATTER = '${PYTHON} -u ../selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate'