]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
update copyright notice
authorAutomatic Updater <source@isc.org>
Thu, 27 Mar 2008 23:45:57 +0000 (23:45 +0000)
committerAutomatic Updater <source@isc.org>
Thu, 27 Mar 2008 23:45:57 +0000 (23:45 +0000)
lib/isccfg/namedconf.c

index 431f7a018c86a886e60c9ac101255defc65e683d..4a762c82771b9a0cb525d6fc14668c7151a5c6d4 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (C) 2004-2006  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006, 2008  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2002, 2003  Internet Software Consortium.
  *
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies.
  *
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: namedconf.c,v 1.30.18.39 2008/03/27 03:44:15 marka Exp $ */
+/* $Id: namedconf.c,v 1.30.18.40 2008/03/27 23:45:57 tbox Exp $ */
 
 /*! \file */
 
@@ -36,7 +36,7 @@
 
 /*% Check a return value. */
 #define CHECK(op)                                              \
-       do { result = (op);                                     \
+       do { result = (op);                                     \
                if (result != ISC_R_SUCCESS) goto cleanup;      \
        } while (0)
 
@@ -247,7 +247,7 @@ static cfg_type_t cfg_type_pubkey = {
  * Note that the old parser allows quotes around the RR type names.
  */
 static cfg_type_t cfg_type_rrtypelist = {
-       "rrtypelist", cfg_parse_spacelist, cfg_print_spacelist, cfg_doc_terminal,
+       "rrtypelist", cfg_parse_spacelist, cfg_print_spacelist, cfg_doc_terminal,
        &cfg_rep_list, &cfg_type_astring
 };
 
@@ -269,7 +269,7 @@ static cfg_type_t cfg_type_matchtype = {
  */
 static cfg_tuplefielddef_t grant_fields[] = {
        { "mode", &cfg_type_mode, 0 },
-       { "identity", &cfg_type_astring, 0 }, /* domain name */ 
+       { "identity", &cfg_type_astring, 0 }, /* domain name */
        { "matchtype", &cfg_type_matchtype, 0 },
        { "name", &cfg_type_astring, 0 }, /* domain name */
        { "types", &cfg_type_rrtypelist, 0 },
@@ -363,7 +363,7 @@ static cfg_tuplefielddef_t rrsetorderingelement_fields[] = {
        { "class", &cfg_type_optional_wild_class, 0 },
        { "type", &cfg_type_optional_wild_type, 0 },
        { "name", &cfg_type_optional_wild_name, 0 },
-       { "order", &cfg_type_ustring, 0 }, /* must be literal "order" */ 
+       { "order", &cfg_type_ustring, 0 }, /* must be literal "order" */
        { "ordering", &cfg_type_ustring, 0 },
        { NULL, NULL, 0 }
 };
@@ -547,7 +547,7 @@ static cfg_type_t cfg_type_serverid = {
 static isc_result_t
 parse_port(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        isc_result_t result;
-       
+
        UNUSED(type);
 
        CHECK(cfg_parse_uint32(pctx, NULL, ret));
@@ -595,7 +595,7 @@ namedconf_or_view_clauses[] = {
        { "key", &cfg_type_key, CFG_CLAUSEFLAG_MULTI },
        { "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
        /* only 1 DLZ per view allowed */
-       { "dlz", &cfg_type_dynamically_loadable_zones, 0 },
+       { "dlz", &cfg_type_dynamically_loadable_zones, 0 },
        { "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI },
        { "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI },
        { NULL, NULL, 0 }
@@ -683,9 +683,9 @@ static cfg_type_t cfg_type_disablealgorithm = {
 };
 
 static cfg_tuplefielddef_t mustbesecure_fields[] = {
-        { "name", &cfg_type_astring, 0 },
-        { "value", &cfg_type_boolean, 0 },
-        { NULL, NULL, 0 }
+       { "name", &cfg_type_astring, 0 },
+       { "value", &cfg_type_boolean, 0 },
+       { NULL, NULL, 0 }
 };
 
 static cfg_type_t cfg_type_mustbesecure = {
@@ -910,7 +910,7 @@ view_clausesets[] = {
        namedconf_or_view_clauses,
        view_clauses,
        zone_clauses,
-       dynamically_loadable_zones_clauses,
+       dynamically_loadable_zones_clauses,
        NULL
 };
 static cfg_type_t cfg_type_viewopts = {
@@ -925,22 +925,22 @@ zone_clausesets[] = {
        NULL
 };
 static cfg_type_t cfg_type_zoneopts = {
-       "zoneopts", cfg_parse_map, cfg_print_map, 
+       "zoneopts", cfg_parse_map, cfg_print_map,
        cfg_doc_map, &cfg_rep_map, zone_clausesets };
+
 /*% The "dynamically loadable zones" statement syntax. */
+
 static cfg_clausedef_t *
 dynamically_loadable_zones_clausesets[] = {
        dynamically_loadable_zones_clauses,
-       NULL
+       NULL
 };
 static cfg_type_t cfg_type_dynamically_loadable_zones_opts = {
-       "dynamically_loadable_zones_opts", cfg_parse_map, 
+       "dynamically_loadable_zones_opts", cfg_parse_map,
        cfg_print_map, cfg_doc_map, &cfg_rep_map,
-       dynamically_loadable_zones_clausesets 
+       dynamically_loadable_zones_clausesets
 };
+
 /*%
  * Clauses that can be found within the 'key' statement.
  */
@@ -958,7 +958,7 @@ key_clausesets[] = {
 };
 static cfg_type_t cfg_type_key = {
        "key", cfg_parse_named_map, cfg_print_map,
-       cfg_doc_map, &cfg_rep_map, key_clausesets 
+       cfg_doc_map, &cfg_rep_map, key_clausesets
 };
 
 
@@ -1154,7 +1154,7 @@ static isc_result_t
 parse_maybe_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type,
                              isc_boolean_t optional, cfg_obj_t **ret)
 {
-        isc_result_t result;
+       isc_result_t result;
        cfg_obj_t *obj = NULL;
        const keyword_type_t *kw = type->of;
 
@@ -1183,7 +1183,7 @@ static isc_result_t
 parse_enum_or_other(cfg_parser_t *pctx, const cfg_type_t *enumtype,
                    const cfg_type_t *othertype, cfg_obj_t **ret)
 {
-        isc_result_t result;
+       isc_result_t result;
        CHECK(cfg_peektoken(pctx, 0));
        if (pctx->token.type == isc_tokentype_string &&
            cfg_is_enum(TOKEN_STRING(pctx), enumtype->of)) {
@@ -1258,17 +1258,17 @@ parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
 }
 static cfg_type_t cfg_type_notifytype = {
        "notifytype", parse_notify_type, cfg_print_ustring, doc_enum_or_other,
-       &cfg_rep_string, notify_enums,
+       &cfg_rep_string, notify_enums,
 };
 
 static const char *ixfrdiff_enums[] = { "master", "slave", NULL };
 static isc_result_t
 parse_ixfrdiff_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
-        return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
+       return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
 }
 static cfg_type_t cfg_type_ixfrdifftype = {
-        "ixfrdiff", parse_ixfrdiff_type, cfg_print_ustring, doc_enum_or_other,
-        &cfg_rep_string, ixfrdiff_enums,
+       "ixfrdiff", parse_ixfrdiff_type, cfg_print_ustring, doc_enum_or_other,
+       &cfg_rep_string, ixfrdiff_enums,
 };
 
 static keyword_type_t key_kw = { "key", &cfg_type_astring };
@@ -1285,7 +1285,7 @@ static cfg_type_t cfg_type_optional_keyref = {
 
 /*%
  * A "controls" statement is represented as a map with the multivalued
- * "inet" and "unix" clauses. 
+ * "inet" and "unix" clauses.
  */
 
 static keyword_type_t controls_allow_kw = {
@@ -1422,14 +1422,14 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
                                       "address") == 0)
                        {
                                /* read "address" */
-                               CHECK(cfg_gettoken(pctx, 0)); 
+                               CHECK(cfg_gettoken(pctx, 0));
                                CHECK(cfg_parse_rawaddr(pctx, *flagp,
                                                        &netaddr));
                                have_address++;
                        } else if (strcasecmp(TOKEN_STRING(pctx), "port") == 0)
                        {
                                /* read "port" */
-                               CHECK(cfg_gettoken(pctx, 0)); 
+                               CHECK(cfg_gettoken(pctx, 0));
                                CHECK(cfg_parse_rawport(pctx,
                                                        CFG_ADDR_WILDOK,
                                                        &port));
@@ -1491,7 +1491,7 @@ static cfg_type_t cfg_type_querysource = {
 
 static isc_result_t
 parse_addrmatchelt(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
-        isc_result_t result;
+       isc_result_t result;
        UNUSED(type);
 
        CHECK(cfg_peektoken(pctx, CFG_LEXOPT_QSTRING));
@@ -1716,9 +1716,9 @@ static isc_result_t
 parse_logfile(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        isc_result_t result;
        cfg_obj_t *obj = NULL;
-       const cfg_tuplefielddef_t *fields = type->of;   
+       const cfg_tuplefielddef_t *fields = type->of;
 
-       CHECK(cfg_create_tuple(pctx, type, &obj));      
+       CHECK(cfg_create_tuple(pctx, type, &obj));
 
        /* Parse the mandatory "file" field */
        CHECK(cfg_parse_obj(pctx, fields[0].type, &obj->value.tuple[0]));
@@ -1727,7 +1727,7 @@ parse_logfile(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        for (;;) {
                CHECK(cfg_peektoken(pctx, 0));
                if (pctx->token.type == isc_tokentype_string) {
-                       CHECK(cfg_gettoken(pctx, 0));           
+                       CHECK(cfg_gettoken(pctx, 0));
                        if (strcasecmp(TOKEN_STRING(pctx),
                                       "versions") == 0 &&
                            obj->value.tuple[1] == NULL) {
@@ -1756,7 +1756,7 @@ parse_logfile(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        return (ISC_R_SUCCESS);
 
  cleanup:
-       CLEANUP_OBJ(obj);       
+       CLEANUP_OBJ(obj);
        return (result);
 }
 
@@ -1952,7 +1952,7 @@ static isc_result_t
 parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
                       cfg_obj_t **ret)
 {
-        isc_result_t result;
+       isc_result_t result;
        cfg_obj_t *obj = NULL;
        UNUSED(type);
 
@@ -1963,9 +1963,9 @@ parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
                        CHECK(cfg_parse_sockaddr(pctx, &cfg_type_sockaddr, ret));
                else {
                        const cfg_tuplefielddef_t *fields =
-                                                  cfg_type_nameport.of;        
+                                                  cfg_type_nameport.of;
                        CHECK(cfg_create_tuple(pctx, &cfg_type_nameport,
-                                              &obj));  
+                                              &obj));
                        CHECK(cfg_parse_obj(pctx, fields[0].type,
                                            &obj->value.tuple[0]));
                        CHECK(cfg_parse_obj(pctx, fields[1].type,
@@ -1979,7 +1979,7 @@ parse_sockaddrnameport(cfg_parser_t *pctx, const cfg_type_t *type,
                return (ISC_R_UNEXPECTEDTOKEN);
        }
  cleanup:
-       CLEANUP_OBJ(obj);       
+       CLEANUP_OBJ(obj);
        return (result);
 }
 
@@ -2034,7 +2034,7 @@ static isc_result_t
 parse_masterselement(cfg_parser_t *pctx, const cfg_type_t *type,
                     cfg_obj_t **ret)
 {
-        isc_result_t result;
+       isc_result_t result;
        cfg_obj_t *obj = NULL;
        UNUSED(type);
 
@@ -2051,7 +2051,7 @@ parse_masterselement(cfg_parser_t *pctx, const cfg_type_t *type,
                return (ISC_R_UNEXPECTEDTOKEN);
        }
  cleanup:
-       CLEANUP_OBJ(obj);       
+       CLEANUP_OBJ(obj);
        return (result);
 }