Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/external/mpl/bind/dist/contrib/dlz/modules/filesystem/dlz_filesystem_dynamic.c,v rcsdiff: /ftp/cvs/cvsroot/src/external/mpl/bind/dist/contrib/dlz/modules/filesystem/dlz_filesystem_dynamic.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- src/external/mpl/bind/dist/contrib/dlz/modules/filesystem/dlz_filesystem_dynamic.c 2018/08/12 12:07:50 1.1.1.1 +++ src/external/mpl/bind/dist/contrib/dlz/modules/filesystem/dlz_filesystem_dynamic.c 2019/01/09 16:48:17 1.1.1.2 @@ -1,4 +1,4 @@ -/* $NetBSD: dlz_filesystem_dynamic.c,v 1.1.1.1 2018/08/12 12:07:50 christos Exp $ */ +/* $NetBSD: dlz_filesystem_dynamic.c,v 1.1.1.2 2019/01/09 16:48:17 christos Exp $ */ /* * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. @@ -48,10 +48,10 @@ * update support */ +#include #include #include #include -#include #include #include @@ -95,7 +95,7 @@ b9_add_helper(struct config_data *cd, co /* * Private methods */ -static isc_boolean_t +static bool is_safe(const char *input) { unsigned int i; unsigned int len = strlen(input); @@ -106,13 +106,13 @@ is_safe(const char *input) { if (input[i] == '.') { /* '.' is not allowed as first char */ if (i == 0) - return (ISC_FALSE); + return (false); /* '..', two dots together is not allowed. */ else if (input[i-1] == '.') - return (ISC_FALSE); + return (false); /* '.' is not allowed as last char */ if (i == len) - return (ISC_FALSE); + return (false); /* only 1 dot in ok location, continue at next char */ continue; } @@ -148,10 +148,10 @@ is_safe(const char *input) { * if we reach this point we have encountered a * disallowed char! */ - return (ISC_FALSE); + return (false); } /* everything ok. */ - return (ISC_TRUE); + return (true); } static isc_result_t @@ -223,11 +223,11 @@ create_path(const char *zone, const char int pathsize; int len; isc_result_t result; - isc_boolean_t isroot = ISC_FALSE; + bool isroot = false; /* special case for root zone */ if (strcmp(zone, ".") == 0) - isroot = ISC_TRUE; + isroot = true; /* if the requested zone is "unsafe", return error */ if (!isroot && !is_safe(zone)) @@ -356,11 +356,11 @@ process_dir(dir_t *dir, void *passback, int i; int len; dir_entry_t *direntry; - isc_boolean_t foundHost; + bool foundHost; tmp[0] = '\0'; /* set 1st byte to '\0' so strcpy works right. */ host[0] = '\0'; - foundHost = ISC_FALSE; + foundHost = false; /* copy base directory name to tmp. */ strcpy(tmp, dir->dirname); @@ -400,7 +400,7 @@ process_dir(dir_t *dir, void *passback, strcat(host, tmpString); } - foundHost = ISC_TRUE; + foundHost = true; /* set tmp again for use later */ strcpy(tmp, dir->dirname); } @@ -425,7 +425,7 @@ process_dir(dir_t *dir, void *passback, sizeof(host) - 1); host[255] = '\0'; } - foundHost = ISC_TRUE; + foundHost = true; break; } } @@ -484,7 +484,7 @@ process_dir(dir_t *dir, void *passback, */ } else if (dir_list != NULL && - foundHost == ISC_FALSE) { + foundHost == false) { continue; } } else /* if we cannot stat entry, skip it. */