summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-09-06 10:06:40 +0200
committerJeremy Allison <jra@samba.org>2017-09-16 00:57:24 +0200
commitaef2b915a2020786f79650078b318d471a6f0381 (patch)
treee680ad7ac6d9f6064497db3af8c43b876b0f7566 /source4/scripting/bin
parentffb7d6b50e0c079f10f881148c584da1c9681310 (diff)
downloadsamba-aef2b915a2020786f79650078b318d471a6f0381.tar.gz
samba_upgradedns: Change the group of the 'binddns dir' too
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_upgradedns7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns
index 2582da0f6bc..db3ef5c6d65 100755
--- a/source4/scripting/bin/samba_upgradedns
+++ b/source4/scripting/bin/samba_upgradedns
@@ -506,6 +506,13 @@ if __name__ == '__main__':
# chown the dns.keytab in the bind-dns directory
if paths.bind_gid is not None:
try:
+ os.chmod(paths.binddns_dir, 0o770)
+ os.chown(paths.binddns_dir, -1, paths.bind_gid)
+ except OSError:
+ if not os.environ.has_key('SAMBA_SELFTEST'):
+ logger.info("Failed to chown %s to bind gid %u",
+ paths.binddns_dir, paths.bind_gid)
+ try:
os.chmod(bind_dns_keytab_path, 0640)
os.chown(bind_dns_keytab_path, -1, paths.bind_gid)
except OSError: