]> git.pld-linux.org Git - packages/bind.git/blame - bind-pidfile.patch
- release 17
[packages/bind.git] / bind-pidfile.patch
CommitLineData
a6f50a6b
AM
1diff -urN bind-8.2.2_P5.org/src/bin/named/ns_config.c bind-8.2.2_P5/src/bin/named/ns_config.c
2--- bind-8.2.2_P5.org/src/bin/named/ns_config.c Tue Nov 9 00:09:42 1999
3+++ bind-8.2.2_P5/src/bin/named/ns_config.c Wed Feb 2 17:30:14 2000
4@@ -1445,8 +1445,10 @@
5 return (NULL);
6 }
7
8+ /* If file isn't our or named is running as root */
9+ if ((geteuid() == 0) || (geteuid() != sb.st_uid))
10 (void)unlink(filename);
11- fd = open(filename, O_WRONLY|O_CREAT|O_EXCL,
12+ fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC,
13 S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
14 if (fd < 0)
15 return (NULL);
This page took 0.027102 seconds and 4 git commands to generate.