preserve original uid/gid of slave zone file
This commit is contained in:
@ -67,7 +67,9 @@ sub do_rewrite {
|
|||||||
}
|
}
|
||||||
close $fh;
|
close $fh;
|
||||||
print "Installing new slave host list\n";
|
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";
|
print "Reloading DNS files\n";
|
||||||
system("/usr/sbin/rndc reload");
|
system("/usr/sbin/rndc reload");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user