1
diff -ur maradns-orig/doc/en/source/csv2.ej maradns-1.2.12.01/doc/en/source/csv2.ej
2
--- maradns-orig/doc/en/source/csv2.ej 2006-07-25 07:51:32.000000000 -0500
3
+++ maradns-1.2.12.01/doc/en/source/csv2.ej 2006-07-25 08:30:10.000000000 -0500
5
percent in a csv2 zone file. This suffix is called, for historical and
6
compatibility reasons, "origin". This is done as the slash command
7
'/origin', taking the new origin as the one argument to this function.
8
+Note that changing the origin does <i>not</i> change the domain suffix
9
+used to determine whether a given domain name is authoritative.
13
diff -ur maradns-orig/parse/Csv2_database.c maradns-1.2.12.01/parse/Csv2_database.c
14
--- maradns-orig/parse/Csv2_database.c 2006-07-25 07:51:32.000000000 -0500
15
+++ maradns-1.2.12.01/parse/Csv2_database.c 2006-07-25 08:11:46.000000000 -0500
19
csv2_add_state *csv2_init_add_state(js_string *zone) {
21
+ js_string *nzone, *norigin;
23
if(zone->unit_size != 1) {
29
+ if((norigin = js_create(zone->unit_count + 1,1)) == 0) {
33
if(js_copy(zone,nzone) == JS_ERROR) {
38
+ if(js_copy(zone,norigin) == JS_ERROR) {
44
new->zone = nzone; /* This is the "origin" */
45
+ new->origin = norigin; /* This is the "origin" */
46
new->ostack = 0; /* A pointer to a "stack" or origin values we can
48
new->ostack_height = 0;
53
+ /* ...the origin string */
54
+ if(x->origin != 0) {
55
+ js_destroy(x->origin);
59
/* And now, finally, get rid of this object, I mean structure */
62
if(state->zone == 0) {
65
+ if(state->origin == 0) {
68
if(js_has_sanity(query) == JS_ERROR) {
71
diff -ur maradns-orig/parse/Csv2_database.h maradns-1.2.12.01/parse/Csv2_database.h
72
--- maradns-orig/parse/Csv2_database.h 2006-07-25 07:51:32.000000000 -0500
73
+++ maradns-1.2.12.01/parse/Csv2_database.h 2006-07-25 07:59:13.000000000 -0500
76
typedef struct csv2_add_state {
78
- js_string *zone; /* This is the "origin", in ASCII "name.com."
80
+ js_string *zone; /* This is the zone that is used for determining
81
+ * whether a given name is authoritative or not,
82
+ * in ASCII "name.com." format */
83
+ js_string *origin; /* This is what is used to substitute '%', also
84
+ * in ASCII "name.com." format */
88
diff -ur maradns-orig/parse/Csv2_parse.c maradns-1.2.12.01/parse/Csv2_parse.c
89
--- maradns-orig/parse/Csv2_parse.c 2006-07-25 07:51:32.000000000 -0500
90
+++ maradns-1.2.12.01/parse/Csv2_parse.c 2006-07-25 08:07:58.000000000 -0500
91
@@ -1197,8 +1197,11 @@
92
if(state->zone == 0) {
95
+ if(state->origin == 0) {
100
+ zone = state->origin;
102
/* We read look for the beginning of the host name; this is made
103
* more complicated that the "host name" may actually be a
104
@@ -1295,7 +1298,8 @@
107
n = js_append_dname(n, stream, 3);
108
- if(csv2_convert_percent(n,state->zone) == 0) {
109
+ if(csv2_convert_percent(n,state->origin)
112
"Problem running convert_percent");
114
@@ -1305,8 +1309,8 @@
115
"Invalid argument for /origin");
118
- js_destroy(state->zone);
120
+ js_destroy(state->origin);
123
} else if(cmd == 3 && look == 's') {
125
@@ -1336,7 +1340,8 @@
128
n = js_append_dname(n, stream, 3);
129
- if(csv2_convert_percent(n,state->zone) == 0) {
130
+ if(csv2_convert_percent(n,state->origin)
133
"Problem running convert_percent");
135
@@ -1364,11 +1369,11 @@
139
- c->origin = state->zone;
140
+ c->origin = state->origin;
144
- zone = state->zone;
146
+ zone = state->origin;
147
} else if(cmd == 4 && look == 'p') {
149
look = csv2_read_unicode(stream);
150
@@ -1391,10 +1396,10 @@
151
/* OK, pop the top value from the origin
152
* stack and make it the origin value */
154
- js_destroy(state->zone);
155
+ js_destroy(state->origin);
156
state->ostack = o->next;
157
- state->zone = o->origin;
158
- zone = state->zone;
159
+ state->origin = o->origin;
160
+ zone = state->origin;
163
csv2_error(stream,"Invalid slash command");