]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
update copyright notice
authorAutomatic Updater <source@isc.org>
Fri, 28 Mar 2008 23:46:04 +0000 (23:46 +0000)
committerAutomatic Updater <source@isc.org>
Fri, 28 Mar 2008 23:46:04 +0000 (23:46 +0000)
lib/bind9/check.c

index 633a7c5a3e9de1b5378d98a6d8690256b1a67770..38fd0c798aff12509c5386b7a37553078410234c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2001-2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check.c,v 1.44.18.39 2008/03/28 03:30:29 marka Exp $ */
+/* $Id: check.c,v 1.44.18.40 2008/03/28 23:46:04 tbox Exp $ */
 
 /*! \file */
 
@@ -402,7 +402,7 @@ check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
 {
        isc_result_t result = ISC_R_SUCCESS, tresult;
        int i = 0;
-       
+
        static const char *acls[] = { "allow-query", "allow-query-cache",
                "allow-recursion", "blackhole", "match-clients",
                "match-destinations", "sortlist", NULL };
@@ -411,7 +411,7 @@ check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                tresult = checkacl(acls[i++], actx, NULL, voptions, config,
                                   logctx, mctx);
                if (tresult != ISC_R_SUCCESS)
-                       result = tresult;  
+                       result = tresult;
        }
        return (result);
 }
@@ -475,8 +475,8 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
        (void)cfg_map_get(options, "preferred-glue", &obj);
        if (obj != NULL) {
                const char *str;
-                str = cfg_obj_asstring(obj);
-                if (strcasecmp(str, "a") != 0 &&
+               str = cfg_obj_asstring(obj);
+               if (strcasecmp(str, "a") != 0 &&
                    strcasecmp(str, "aaaa") != 0 &&
                    strcasecmp(str, "none") != 0)
                        cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
@@ -505,7 +505,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
                                isc_buffer_add(&b, strlen(str));
                                tresult = dns_name_fromtext(name, &b,
                                                           dns_rootname,
-                                                           ISC_FALSE, NULL);
+                                                          ISC_FALSE, NULL);
                                if (tresult != ISC_R_SUCCESS) {
                                        cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
                                                    "bad domain name '%s'",
@@ -515,7 +515,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
                        }
                }
        }
-       
+
        /*
         * Set supported DNSSEC algorithms.
         */
@@ -711,7 +711,7 @@ get_masters_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret)
 
 static isc_result_t
 validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
-                isc_uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx)
+                isc_uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx)
 {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
@@ -733,7 +733,7 @@ validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
  newlist:
        list = cfg_tuple_get(obj, "addresses");
        element = cfg_list_first(list);
- resume:       
+ resume:
        for ( ;
             element != NULL;
             element = cfg_list_next(element))
@@ -830,7 +830,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                isc_buffer_init(&b, str, strlen(str));
                isc_buffer_add(&b, strlen(str));
                tresult = dns_name_fromtext(dns_fixedname_name(&fixed), &b,
-                                            dns_rootname, ISC_FALSE, NULL);
+                                           dns_rootname, ISC_FALSE, NULL);
                if (tresult != ISC_R_SUCCESS) {
                        cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
                                    "'%s' is not a valid name", str);
@@ -863,7 +863,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                        const cfg_obj_t *typeobj;
                        isc_textregion_t r;
                        dns_rdatatype_t type;
-                       
+
                        typeobj = cfg_listelt_value(element2);
                        DE_CONST(cfg_obj_asstring(typeobj), r.base);
                        r.length = strlen(r.base);
@@ -871,7 +871,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                        tresult = dns_rdatatype_fromtext(&type, &r);
                        if (tresult != ISC_R_SUCCESS) {
                                cfg_obj_log(typeobj, logctx, ISC_LOG_ERROR,
-                                            "'%s' is not a valid type", r.base);
+                                           "'%s' is not a valid type", r.base);
                                result = tresult;
                        }
                }
@@ -1075,7 +1075,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                    (options[i].allowed & CHECKACL) != 0) {
 
                        tresult = checkacl(options[i].name, actx, zconfig,
-                                          voptions, config, logctx, mctx);
+                                          voptions, config, logctx, mctx);
                        if (tresult != ISC_R_SUCCESS)
                                result = tresult;
                }
@@ -1164,7 +1164,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        /*
         * Check that forwarding is reasonable.
         */
-       obj = NULL;     
+       obj = NULL;
        if (root) {
                if (voptions != NULL)
                        (void)cfg_map_get(voptions, "forwarders", &obj);
@@ -1205,7 +1205,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        result = tresult;
                }
        }
-       
+
        return (result);
 }
 
@@ -1234,7 +1234,7 @@ bind9_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
                { "hmac-sha512", 512 },
                {  NULL, 0 }
        };
-       
+
        (void)cfg_map_get(key, "algorithm", &algobj);
        (void)cfg_map_get(key, "secret", &secretobj);
        if (secretobj == NULL || algobj == NULL) {
@@ -1285,7 +1285,7 @@ bind9_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
                             (digestbits < 80U)))
                                cfg_obj_log(algobj, logctx, ISC_LOG_WARNING,
                                            "key '%s' digest-bits too small "
-                                           "[<%u]", keyname, 
+                                           "[<%u]", keyname,
                                            algorithms[i].size/2);
                } else {
                        cfg_obj_log(algobj, logctx, ISC_LOG_ERROR,
@@ -1416,7 +1416,7 @@ check_servers(const cfg_obj_t *servers, isc_log_t *logctx) {
        }
        return (result);
 }
-               
+
 static isc_result_t
 check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
               dns_rdataclass_t vclass, isc_log_t *logctx, isc_mem_t *mctx)
@@ -1479,7 +1479,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                isc_symtab_destroy(&symtab);
                return (tresult);
        }
-       
+
        if (voptions != NULL) {
                keys = NULL;
                (void)cfg_map_get(voptions, "key", &keys);
@@ -1602,10 +1602,10 @@ bind9_check_logging(const cfg_obj_t *config, isc_log_t *logctx,
        const char *channelname;
        const char *catname;
        const cfg_obj_t *fileobj = NULL;
-        const cfg_obj_t *syslogobj = NULL;
-        const cfg_obj_t *nullobj = NULL;
-        const cfg_obj_t *stderrobj = NULL;
-        const cfg_obj_t *logobj = NULL;
+       const cfg_obj_t *syslogobj = NULL;
+       const cfg_obj_t *nullobj = NULL;
+       const cfg_obj_t *stderrobj = NULL;
+       const cfg_obj_t *logobj = NULL;
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        isc_symtab_t *symtab = NULL;
@@ -1666,9 +1666,9 @@ bind9_check_logging(const cfg_obj_t *config, isc_log_t *logctx,
        cfg_map_get(logobj, "category", &categories);
 
        for (element = cfg_list_first(categories);
-             element != NULL;
-             element = cfg_list_next(element))
-        {
+            element != NULL;
+            element = cfg_list_next(element))
+       {
                category = cfg_listelt_value(element);
                catname = cfg_obj_asstring(cfg_tuple_get(category, "name"));
                if (isc_log_categorybyname(logctx, catname) == NULL) {
@@ -1684,7 +1684,7 @@ bind9_check_logging(const cfg_obj_t *config, isc_log_t *logctx,
                        channel = cfg_listelt_value(delement);
                        channelname = cfg_obj_asstring(channel);
                        tresult = isc_symtab_lookup(symtab, channelname, 1,
-                                                   &symvalue);
+                                                   &symvalue);
                        if (tresult != ISC_R_SUCCESS) {
                                cfg_obj_log(channel, logctx, ISC_LOG_ERROR,
                                            "undefined channel: '%s'",
@@ -1702,12 +1702,12 @@ key_exists(const cfg_obj_t *keylist, const char *keyname) {
        const cfg_listelt_t *element;
        const char *str;
        const cfg_obj_t *obj;
-       
+
        if (keylist == NULL)
                return (ISC_R_NOTFOUND);
        for (element = cfg_list_first(keylist);
-            element != NULL;   
-            element = cfg_list_next(element)) 
+            element != NULL;
+            element = cfg_list_next(element))
        {
                obj = cfg_listelt_value(element);
                str = cfg_obj_asstring(cfg_map_getname(obj));
@@ -1725,7 +1725,7 @@ bind9_check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist,
        const cfg_obj_t *control_keylist;
        const cfg_listelt_t *element;
        const cfg_obj_t *key;
-       
+
        control_keylist = cfg_tuple_get(control, "keys");
        if (cfg_obj_isvoid(control_keylist))
                return (ISC_R_SUCCESS);
@@ -1877,7 +1877,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
        if (bind9_check_controls(config, logctx, mctx) != ISC_R_SUCCESS)
                result = ISC_R_FAILURE;
 
-       if (options != NULL && 
+       if (options != NULL &&
            check_order(options, logctx) != ISC_R_SUCCESS)
                result = ISC_R_FAILURE;
 
@@ -1939,7 +1939,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
                                const char *file;
                                unsigned int line;
                                RUNTIME_CHECK(isc_symtab_lookup(symtab, key,
-                                          vclass, &symvalue) == ISC_R_SUCCESS);
+                                          vclass, &symvalue) == ISC_R_SUCCESS);
                                file = cfg_obj_file(symvalue.as_cpointer);
                                line = cfg_obj_line(symvalue.as_cpointer);
                                cfg_obj_log(view, logctx, ISC_LOG_ERROR,
@@ -1979,8 +1979,8 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
                }
        }
 
-        tresult = cfg_map_get(config, "acl", &acls);
-        if (tresult == ISC_R_SUCCESS) {
+       tresult = cfg_map_get(config, "acl", &acls);
+       if (tresult == ISC_R_SUCCESS) {
                const cfg_listelt_t *elt;
                const cfg_listelt_t *elt2;
                const char *aclname;
@@ -1999,7 +1999,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
                                        cfg_obj_log(acl, logctx, ISC_LOG_ERROR,
                                                    "attempt to redefine "
                                                    "builtin acl '%s'",
-                                                   aclname);
+                                                   aclname);
                                        result = ISC_R_FAILURE;
                                        break;
                                }
@@ -2029,8 +2029,8 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
                }
        }
 
-        tresult = cfg_map_get(config, "kal", &kals);
-        if (tresult == ISC_R_SUCCESS) {
+       tresult = cfg_map_get(config, "kal", &kals);
+       if (tresult == ISC_R_SUCCESS) {
                const cfg_listelt_t *elt;
                const cfg_listelt_t *elt2;
                const char *aclname;