mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
1214. [bug] Win32: isc_file_renameunique() could leave zero length
files behind.
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -1,3 +1,9 @@
|
|||||||
|
1214. [bug] Win32: isc_file_renameunique() could leave zero length
|
||||||
|
files behind.
|
||||||
|
|
||||||
|
1213. [func] Report view associated with client if it is not a
|
||||||
|
standard view (_default or _bind).
|
||||||
|
|
||||||
1212. [port] libbind: 64k answer buffers were causing stack space
|
1212. [port] libbind: 64k answer buffers were causing stack space
|
||||||
to be exceeded for certian OS. Use heap space instead.
|
to be exceeded for certian OS. Use heap space instead.
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: file.c,v 1.27 2001/10/01 20:58:51 gson Exp $ */
|
/* $Id: file.c,v 1.28 2002/02/28 00:23:34 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -301,6 +301,8 @@ isc_file_renameunique(const char *file, char *templet) {
|
|||||||
fd = mkstemp(templet);
|
fd = mkstemp(templet);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
result = isc__errno2result(errno);
|
result = isc__errno2result(errno);
|
||||||
|
else
|
||||||
|
close(fd);
|
||||||
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
res = isc_file_safemovefile(file, templet);
|
res = isc_file_safemovefile(file, templet);
|
||||||
@@ -309,8 +311,6 @@ isc_file_renameunique(const char *file, char *templet) {
|
|||||||
(void)unlink(templet);
|
(void)unlink(templet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fd != -1)
|
|
||||||
close(fd);
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user