Your message dated
with message-id <20100909203528.4772.62981.mass-bugs-cl...@merkel.debian.org>
and subject line nstx removed from Debian unstable
has caused the Debian Bug report #553297,
regarding nstx: Uses non-standard '_' in domain names
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
553297: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553297
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: nstx
Version: 1.1-beta6-5
Severity: normal
Tags: patch upstream
Hello,
nstx uses base64 encoding, which produces '_' characters, which is not
valid in a domain name. To get more DNS server coverage, I have patched
my version into using base32, here is my (tested) patch, in case it can
be useful more broadly.
Samuel
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages nstx depends on:
ii adduser 3.111 add and remove users and groups
ii libc6 2.9-25 GNU C Library: Shared libraries
nstx recommends no packages.
nstx suggests no packages.
-- no debconf information
diff -ur nstx-1.1-beta6/nstx_encode.c
/home/samy/src/nstx-1.1-beta6/nstx_encode.c
--- nstx-1.1-beta6/nstx_encode.c 2009-10-30 00:49:24.000000000 +0100
+++ /home/samy/src/nstx-1.1-beta6/nstx_encode.c 2009-10-29 04:24:31.000000000
+0100
@@ -23,9 +23,16 @@
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
+
+//#define base64
unsigned char map[] =
+#ifdef base64
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_1234567890";
+#else
+ "abcdefghijklmnopqrstuvABCDEFGHIJ";
+#endif
unsigned char *revmap = NULL;
void init_revmap (void)
@@ -43,21 +50,44 @@
int i = 0, off = 1, cut = 0;
static unsigned char *buf = NULL;
+#ifdef base64
if (len % 3)
cut = 3 - len%3;
+#else
+ if (len % 5)
+ cut = 5 - len%5;
+#endif
+#ifdef base64
buf = realloc(buf, ((len+2)/3)*4+2);
+#else
+ buf = realloc(buf, ((len+4)/5)*8+2);
+#endif
buf[0] = map[cut];
while (i < len) {
- buf[off + 0] = map[(data[i] & 252) >> 2];
- buf[off + 1] = map[((data[i] & 3) << 4) | ((data[i+1] & 240) >> 4)];
- buf[off + 2] = map[((data[i+1] & 15) << 2 ) | ((data[i+2] & 192) >> 6)];
- buf[off + 3] = map[(data[i+2] & 63)];
+#ifdef base64
+ buf[off + 0] = map[(data[i] & 0xfc) >> 2];
+ buf[off + 1] = map[((data[i] & 3) << 4) | ((data[i+1] & 0xf0) >> 4)];
+ buf[off + 2] = map[((data[i+1] & 0xf) << 2 ) | ((data[i+2] & 0xc0) >>
6)];
+ buf[off + 3] = map[(data[i+2] & 0x3f)];
i += 3;
off += 4;
+#else
+ buf[off + 0] = map[(data[i] & 0xf8) >> 3];
+ buf[off + 1] = map[((data[i] & 7) << 2) | ((data[i+1] & 0xc0) >> 6)];
+ buf[off + 2] = map[((data[i+1] & 0x3e) >> 1)];
+ buf[off + 3] = map[((data[i+1] & 0x1) << 4) | ((data[i+2] & 0xf0) >> 4)];
+ buf[off + 4] = map[((data[i+2] & 0xf) << 1) | ((data[i+3] & 0x80) >> 7)];
+ buf[off + 5] = map[((data[i+3] & 0x7c) >> 2)];
+ buf[off + 6] = map[((data[i+3] & 0x3) << 3) | ((data[i+4] & 0xe0) >> 5)];
+ buf[off + 7] = map[((data[i+4] & 0x1f))];
+ i += 5;
+ off += 8;
+#endif
}
buf[off] = '\0';
+ //printf("encoded %d into %s\n", len, buf);
return buf;
}
@@ -72,14 +102,32 @@
len = strlen((char*)data);
+#ifdef base64
buf = realloc(buf, ((len+3)/4)*3);
+#else
+ buf = realloc(buf, ((len+7)/8)*5);
+#endif
+#ifdef base64
while (off+3 < len) {
- buf[i+0] = (revmap[data[off]]<<2)|((revmap[data[off+1]]&48)>>4);
+#else
+ while (off+7 < len) {
+#endif
+#ifdef base64
+ buf[i+0] = (revmap[data[off]]<<2)|((revmap[data[off+1]]&0x30)>>4);
buf[i+1] = ((revmap[data[off+1]]&15)<<4)|((revmap[data[off+2]]&60)>>2);
buf[i+2] = ((revmap[data[off+2]]&3)<<6)|(revmap[data[off+3]]);
i += 3;
off += 4;
+#else
+ buf[i+0] = (revmap[data[off]]<<3)|((revmap[data[off+1]]&0x1c)>>2);
+ buf[i+1] =
((revmap[data[off+1]]&0x3)<<6)|((revmap[data[off+2]])<<1)|((revmap[data[off+3]]&0x10)>>4);
+ buf[i+2] =
((revmap[data[off+3]]&0xf)<<4)|((revmap[data[off+4]]&0x1e)>>1);
+ buf[i+3] =
((revmap[data[off+4]]&0x1)<<7)|((revmap[data[off+5]])<<2)|((revmap[data[off+6]]&0x18)>>3);
+ buf[i+4] = ((revmap[data[off+6]]&0x7)<<5)|((revmap[data[off+7]]));
+ i += 5;
+ off += 8;
+#endif
}
*rlen = i - revmap[data[0]];
diff -ur nstx-1.1-beta6/nstx_dns.c /home/samy/src/nstx-1.1-beta6/nstx_dns.c
--- nstx-1.1-beta6/nstx_dns.c 2009-10-30 00:49:24.000000000 +0100
+++ /home/samy/src/nstx-1.1-beta6/nstx_dns.c 2009-10-29 05:22:54.000000000
+0100
@@ -603,9 +607,9 @@
} else if (type == DNS_QUERY)
{
// ret = ((raw-suffixlen)*189-759)/256;
- ret = (189*(254-suffixlen))/256-6;
- if (ret > (maxq = (183-(189*suffixlen)/256)))
- ret = maxq;
+ ret = (150*(254-suffixlen))/256-6;
+ //if (ret > (maxq = (183-(189*suffixlen)/256)))
+ // ret = maxq;
}
return (ret > 0) ? ret : 0;
--- End Message ---
--- Begin Message ---
Version: 1.1-beta6-6+rm
nstx has been removed from Debian unstable: http://bugs.debian.org/595988
Closing its bugs with a Version higher than the last unstable upload.
More information about this script at:
http://git.debian.org/?p=users/morph/mass-bugs-close.git;a=blob_plain;f=README;hb=HEAD
--- End Message ---