preserve original uid/gid of slave zone file
This commit is contained in:
@ -67,7 +67,9 @@ sub do_rewrite {
|
||||
}
|
||||
close $fh;
|
||||
print "Installing new slave host list\n";
|
||||
system("install -o bind -g bind $path /etc/bind/martnet.slave.zones.9");
|
||||
my $old_uid = (lstat "/etc/bind/martnet.slave.zones.9")[4];
|
||||
my $old_gid = (lstat "/etc/bind/martnet.slave.zones.9")[5];
|
||||
system("install -o $old_uid -g $old_gid $path /etc/bind/martnet.slave.zones.9");
|
||||
print "Reloading DNS files\n";
|
||||
system("/usr/sbin/rndc reload");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user