Commit 7ec4367f authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

434. [func] New function isc_file_isabsolute().

parent ec393c03
434. [func] New function isc_file_isabsolute().
433. [func] isc_base64_decodestring() now accepts newlines
within the base64 data. This makes it possible
to break up the key data in a "trusted-keys"
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: file.h,v 1.9 2000/08/01 01:30:10 tale Exp $ */
/* $Id: file.h,v 1.10 2000/09/08 18:37:25 gson Exp $ */
#ifndef ISC_FILE_H
#define ISC_FILE_H 1
......@@ -159,13 +159,18 @@ isc_file_remove(const char *filename);
* Remove the file named by 'filename'.
*/
isc_boolean_t
isc_file_isabsolute(const char *filename);
/*
* Return ISC_TRUE iff the given file name is absolute.
*/
/*
* XXX We should also have a isc_file_writeeopen() function
* for safely open a file in a publicly writable directory
* (see write_open() in BIND 8's ns_config.c).
*/
ISC_LANG_ENDDECLS
#endif /* ISC_FILE_H */
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: file.c,v 1.20 2000/08/01 01:31:16 tale Exp $ */
/* $Id: file.c,v 1.21 2000/09/08 18:37:26 gson Exp $ */
#include <config.h>
......@@ -180,3 +180,8 @@ isc_file_remove(const char *filename) {
else
return (isc__errno2result(errno));
}
isc_boolean_t
isc_file_isabsolute(const char *filename) {
return (ISC_TF(filename[0] == '/'));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment