1
--- maradns-1.3.02/parse/Csv2_rr_txt.c 2006-07-17 20:50:44.000000000 -0700
2
+++ maradns-1.3.03/parse/Csv2_rr_txt.c 2007-01-26 21:27:39.000000000 -0800
4
-/* Copyright (c) 2004-2006 Sam Trenholme
5
+/* Copyright (c) 2004-2007 Sam Trenholme
10
* quoted text; this should be fixed */
11
if(csv2_is_quote(look)) {
12
state = TXT_GET_STATE;
15
+ } else if(stream->tilde_handling == 103) {
18
+ "The # character is not allowed in TXT records\n"
19
+ "Please use the '\\x23' escape sequence instead.");
21
+ } else if(look == '|') {
23
+ "The | character is not allowed in TXT records\n"
24
+ "Please use the '\\x7c' escape sequence instead.");
26
+ } else if(look == 127) {
28
+ "The DEL character is not allowed in TXT records\n"
29
+ "Please use the '\\x7f' escape sequence instead.");
30
+ } else if(look < ' ') {
32
+ "Control characters (including newlines) are not allowed in TXT records\n"
33
+ "Please use the appropriate escape sequence instead.");
35
+ } else if(csv2_txt_append(out, look, &txt_len)
40
if(csv2_txt_append(out, look, &txt_len) != 1) {
43
--- maradns-1.3.03/doc/en/source/update.ej.orig 2007-01-26 18:54:21.000000000 -0800
44
+++ maradns-1.3.03/doc/en/source/update.ej 2007-01-26 21:25:35.000000000 -0800
49
+Note that, if tildes are used to separate records, the following restrictions
50
+are added to TXT records:
53
+<li>The pipe (|) character is not allowed in TXT records. Use the '\x7c'
54
+ escape sequence instead. For example, change a TXT record that looks
55
+ like 'ls | more' to become 'ls '\x7c' more'
57
+<li>The pipe (#) character is not allowed in TXT records. Use the '\x23'
58
+ escape sequence instead. For example, change a TXT record that looks
59
+ like 'press the # key' to become 'press the '\x23' key'
61
+<li>Control characters, including the newline character, are not allowed.
62
+ The escape sequence used depends on the desired control character.
63
+ For example, use \x0a for a UNIX linefeed.
66
Another MaraDNS 1.3 change only affects the unusual case when one has
67
delegation NS records. Let us suppose we have a zone file with the
69
--- maradns-1.3.02/doc/en/source/csv2.ej 2007-01-09 12:16:34.000000000 -0800
70
+++ maradns-1.3.03/doc/en/source/csv2.ej 2007-01-26 21:48:27.000000000 -0800
73
-<TH>CSV2 5 "December 2006" MARADNS "MaraDNS reference"</TH>
74
+<TH>CSV2 5 "January 2007" MARADNS "MaraDNS reference"</TH>
76
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
80
The csv2 zone file format is the zone file format introduced in MaraDNS 1.2.
81
This zone file format uses any kind of whitespace (space, tab, and carriage
82
-return), or the '|' character, to deliminate fields. i
83
+return), or the '|' character, to deliminate fields.
85
<h2>Tilde delimination</h2>
88
in csv2 zone files; in order to maintain maximum compatibility with
89
MaraDNS 1.2 zone files, this feature is only enabled if a tilde is
90
placed between the first and second record. Otherwise, tildes are
91
-not allowed in zone files at all.
92
+not allowed in zone files.
99
Any binary data can be specified; see the <b>csv2_txt(5)</b> manual page
104
+If tildes are used to separate records, a TXT record can not contain a
105
+'|' (pipe) character, a '#' character, nor any ASCII control character;
106
+these characters can be added to a TXT record via the use of escape
107
+sequences; read the csv2_txt man page for details.
111
--- maradns-1.3.02/doc/en/source/csv2_txt.ej 2006-12-21 00:34:46.000000000 -0800
112
+++ maradns-1.3.03/doc/en/source/csv2_txt.ej 2007-01-26 21:46:07.000000000 -0800
115
-<TH>CSV2_TXT 5 "February 2005" MARADNS "MaraDNS reference"</TH>
116
+<TH>CSV2_TXT 5 "January 2007" MARADNS "MaraDNS reference"</TH>
118
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
121
a.example.com. TXT 'This is some text' ~
124
-It is also possible, to place almost any byte with
125
-a value less than 0x80 (128) between quotes. If there are any bytes
126
+It is also possible, to place almost any printable ASCII characters
127
+between quotes. The '~' (tilde) character is not allowed unless
128
+csv2_tilde_handling has a value of 0; the '|' (pipe), '#' (hash) and
129
+non-printable ASCII control characters are not allowed in TXT data
130
+if the ~ is used to separate records. If there are any bytes
131
with a value of 0x80 or more, the data must be UTF-8 encoded Unicode.
138
-The ASCII characters not allowed in quotes are the ' character, the
139
-'|' character, the '~' (tilde) character, and the '#' character. See
140
-BACKSLASH ESCAPE SEQUENCES below for information on adding these
141
+The printable ASCII characters not allowed in quotes are the ' character,
142
+the '|' character, the '~' (tilde) character, and the '#' character.
143
+See BACKSLASH ESCAPE SEQUENCES below for information on adding these
144
characters to TXT or RAW fields.
146
<h2>UNQUOTED DATA</h2>
148
<h2>BACKSLASH ESCAPE SEQUENCES</h2>
150
In order to accommodate storing non-UTF-8 high bit characters, the
151
-single quote character, the '|', '~', and '#' characters, and to permit
153
-TXT/RAW records (with comments allowed mid-record), the TXT/RAW RR allows
154
-backslashes. These backslashes only have significance <i>outside</i>
155
-of quoted text; if they are placed inside single quotes, they are not
156
-interpreted and result in a literal backslash being added to the resource
158
+single quote character, non-printable ASCII control codes, the '|',
159
+'~', and '#' characters, and to permit multi-line TXT/RAW records
160
+(with comments allowed mid-record), the TXT/RAW RR allows backslashes.
161
+These backslashes only have significance <i>outside</i> of quoted text;
162
+if they are placed inside single quotes, they are not interpreted and
163
+result in a literal backslash being added to the resource record data.
167
@@ -135,38 +137,38 @@
171
-e.example.com. TXT \x80\x81\x82\x83
172
+e.example.com. TXT \x80\x81\x82\x83 ~
175
This same data can also be created as follows:
178
-f.example.com. TXT \200\201\202\203
179
+f.example.com. TXT \200\201\202\203 ~
182
Octal and hex information can be mixed:
185
-g.example.com. TXT \200\x81\202\x83
186
+g.example.com. TXT \200\x81\202\x83 ~
189
Literal single quotes can be placed in resource records:
192
-h.example.com. TXT 'perl -e '\''print "A Perl of a TXT record!\n"'\'
193
+h.example.com. TXT 'perl -e '\''print "A Perl of a TXT record!\n"'\' ~
196
The above example produces this record:
199
-perl -e 'print "A Perl of a TXT record!\n"'
200
+perl -e 'print "A Perl of a TXT record!\n"' ~
203
To render the '~' character, use the escape sequence \x7e (outside of
204
quotes). For example:
207
-h1.example.com. TXT 'http://ocf.berkeley.edu/'\x7e'set'
208
+h1.example.com. TXT 'http://ocf.berkeley.edu/'\x7e'set' ~
211
Produces this record:
213
To render the '|' character, use the escape sequence \x7c:
216
-h2.example.com. TXT 'ls '\x7c' more'
217
+h2.example.com. TXT 'ls '\x7c' more' ~
220
Produces this record:
222
To render the '#' character, use the escape sequence \x23:
225
-h3.example.com. TXT 'Press '\x23' for customer service'
226
+h3.example.com. TXT 'Press '\x23' for customer service' ~
229
Produces this record:
231
record will span more than one line on an 80-column display:
234
-i.example.com. TXT 'Not only did the quick brown fox jump over the lazy dog, but the lazy dog jumped over the cat.'
235
+i.example.com. TXT 'Not only did the quick brown fox jump over the lazy dog, but the lazy dog jumped over the cat.' ~
238
Without affecting this resource record, the same data can be split over
241
j.example.com. TXT 'Not only did the quick brown fox jump '\
242
'over the lazy dog, but the lazy dog'\
243
- ' jumped over the cat.'
244
+ ' jumped over the cat.' ~
250
k.example.com. TXT 'Not only did the quick brown fox jump '\ # The fox
251
'over the lazy dog, but the lazy dog'\ # The dog
252
- ' jumped over the cat.' # The cat
253
+ ' jumped over the cat.' ~ # The cat
256
Note that, since the third comment is not preceeded by a backslash, this
259
# Now we have some more comments,
260
# followed by the rest of the data
261
- 'and this is the rest of the data'
262
+ 'and this is the rest of the data' ~
266
@@ -265,22 +267,22 @@
267
bytes long. The default is to have one chunk, as follows:
270
-o.example.com. TXT 'TXT record with only one chunk'
271
+o.example.com. TXT 'TXT record with only one chunk' ~
274
It is also possible to have a record with multiple chunks. Chunks
275
are delimited by an unquoted ';' character:
278
-p.example.com. TXT 'This is chunk one';'This is chunk two'
279
+p.example.com. TXT 'This is chunk one';'This is chunk two' ~
285
-q.example.com. TXT 'This is chunk one';\ # Our first chunk
286
- This_is_chunk_two;\ # Our second chunk
287
- 'This is chunk three' # Our final chunk
288
+q.example.com. TXT 'This is chunk one';\ # Our first chunk
289
+ This_is_chunk_two;\ # Our second chunk
290
+ 'This is chunk three' ~ # Our final chunk
293
Quoted ; characters simply add a ; to the record data.
294
@@ -300,14 +302,14 @@
295
It is possible to have zero length chunks:
298
-r.example.com. TXT 'chunk one';;'chunk three' # Chunk two zero-length
299
+r.example.com. TXT 'chunk one';;'chunk three' ~ # Chunk two zero-length
302
In particular, is is possible to have zero length chunks at the
303
beginning and end of a TXT record:
306
-s.example.com. TXT ;'chunk two'; # Chunks one and three zero-length
307
+s.example.com. TXT ;'chunk two'; ~ # Chunks one and three zero-length
310
Do not place semicolons at the beginning nor end of TXT records unless
311
@@ -328,27 +330,27 @@
315
-t1.example.com. RAW 40 \x10\x01\x02'Kitchen sink'\x2b' data'
316
+t1.example.com. RAW 40 \x10\x01\x02'Kitchen sink'\x2b' data' ~
320
-t.example.com. RAW 40 \020\001\002Kitchen' sink+ data'
321
+t.example.com. RAW 40 \020\001\002Kitchen' sink+ data' ~
325
-u.example.com. RAW 40 \x10\x01\x02Kitchen\x20sink+\x20data
326
+u.example.com. RAW 40 \x10\x01\x02Kitchen\x20sink+\x20data ~
330
v.example.com. RAW 40 \x10\001\x02\
331
- 'Kitchen sink+ data'
332
+ 'Kitchen sink+ data' ~
336
w.example.com. RAW 40 \x10\ # Meaning: 16
338
\x02\ # Sub-coding: 2
339
- 'Kitchen sink+ data' # Data: 'Kitchen sink+ data'
340
+ 'Kitchen sink+ data' ~ # Data: 'Kitchen sink+ data'
343
<h1>LEGAL DISCLAIMER</h1>