2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 00:55:24 +00:00

Ensure that log files are plain files. (RT #22771)

This commit is contained in:
Scott Mann
2011-03-04 14:07:03 +00:00
parent 15852f1a77
commit 32babe43eb
9 changed files with 105 additions and 30 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: file.h,v 1.39 2011/01/11 23:47:14 tbox Exp $ */
/* $Id: file.h,v 1.40 2011/03/04 14:07:03 smann Exp $ */
#ifndef ISC_FILE_H
#define ISC_FILE_H 1
@@ -185,6 +185,27 @@ isc_file_isabsolute(const char *filename);
* \brief Return #ISC_TRUE if the given file name is absolute.
*/
isc_result_t
isc_file_isplainfile(const char *name);
/*!<
* \brief Check that the file is a plain file
*
* Returns:
*\li #ISC_R_SUCCESS
* Success. The file is a plain file.
*\li #ISC_R_INVALIDFILE
* The path specified was not usable by the operating system.
*\li #ISC_R_FILENOTFOUND
* The file does not exist. This return code comes from
* errno=ENOENT when stat returns -1. This code is mentioned
* here, because in logconf.c, it is the one rcode that is
* permitted in addition to ISC_R_SUCCESS. This is done since
* the next call in logconf.c is to isc_stdio_open(), which
* will create the file if it can.
*\li #other ISC_R_* errors translated from errno
* These occur when stat returns -1 and an errno.
*/
isc_boolean_t
isc_file_iscurrentdir(const char *filename);
/*!<