+2001-01-12
+ * Makefile.in: update for 1.2.1.
+ * version 1.2.1 release
+
+2000-12-28
+ * Makefile.in: update for 1.2.1-rc2.
+ * README, README.ja: update for 1.2.1-rc2 release.
+
+2000-12-26
+ * lib/race.c: fix a bug that causes incorrect decoding of RACE-
+ encoded names if they contain any of uppercase characters.
+ * patch/bind8/bind-8.2.3-T6B-patch: removed.
+ * patch/bind8/bind-8.2.3-T9B-patch: created.
+ * DISTFILES: replace bind-8.2.3-T6B-patch with bind-8.2.3-T9B-patch.
+
+2000-12-22
+ * tools/rpm/mdnkit.spec: update for 1.2.1.
+ * patch/bind8/bind-8.2.2-P7-patch, patch/bind8/bind-8.2.3-T6B-patch:
+ add more 8bit-through fixes. previous versions have problems when
+ domain name string contains some special characters, especially
+ backslash.
+
+2000-12-21
+ * lib/Makefile.in, tools/runmdn/Makefile.in: increment revision
+ number of libraries for the next public release.
+
+2000-12-20
+ * README, README.ja: update for 1.2.1 release.
+ * Makerfile.in: update for 1.2.1-rc1.
+
+2000-12-14
+ * patch/bind9/bind-9.0.0-patch: removed.
+ * patch/bind9/bind-9.0.1-patch: created.
+ * DISTFILES: replace bind-9.0.0-patch with bind-9.0.1-patch.
+ * lib/race.c: fix an encoding (compression) bug, regarding
+ 0xff handling. actually the old behavior was in accordance with
+ the obsolete -00 draft.
+
+2000-12-08
+ * lib/race.c: catch up with draft-ietf-idn-race-03.txt.
+ check an input string severely.
+
+2000-12-07
+ * tools/mdnconv/util.c: remove find_prefix().
+
+2000-12-06
+ * tools/mdnconv/mdnconv.c, tools/mdnconv/util.c, tools/mdnconv/util.h:
+ change ACE decoding strategy.
+
+2000-12-04
+ * tools/runmdn/Makefile.in: add missing brace.lo and lace.lo
+ to the list of object files.
+
2000-11-27
* wsock/config/mdnconf.tcl: implement "unwrap all" button.
* wsock/README.txt, wsock/README_j.txt: add description on "unwrap
-# $Id: Makefile.in,v 1.31 2000/11/27 01:58:31 ishisone Exp $
+# $Id: Makefile.in,v 1.34 2001/01/12 00:28:08 ishisone Exp $
# Copyright (c) 2000 Japan Network Information Center. All rights reserved.
#
# By using this file, you agree to the terms and conditions set forth bellow.
prefix = @prefix@
exec_prefix = @exec_prefix@
+PERL = perl
+MKTARPKG = ../util/mktarpkg
+
SUBDIRS = include lib dnsproxy man tools
-CUR_VERSION = 1.2
-PREV_VERSION = 1.1
-PREV_TAG = REL_1_1
+CUR_VERSION = 1.2.1
+PREV_VERSION = 1.2
+PREV_TAG = REL_1_2
DISTFILE = mdnkit-$(CUR_VERSION)-src
PATCHFILE = mdnkit-$(PREV_VERSION)-$(CUR_VERSION)-src-patch
for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done
dist:
- cd $(srcdir); mktarpkg --gzip=9 $(DISTFILE)
+ cd $(srcdir); $(PERL) $(MKTARPKG) --gzip=9 $(DISTFILE)
patch:
cd $(srcdir); mkcvspatch --gzip=9 --header=patch.header \
-; $Id: NEWS,v 1.5 2000/11/21 09:03:23 ishisone Exp $
+; $Id: NEWS,v 1.8 2000/12/28 02:36:29 ishisone Exp $
+
+Major changes in version 1.2.1:
+
+* RACE converter incorporates numeral checks introduced by -03 draft.
+ Also a bug, which produces incorrectly encoded string (actually
+ encoded in the way -00 draft specifies), is fixed.
+
+* The base version of BIND-9 patch has changed from 9.0.0 to 9.0.1.
+
+* The base versions of BIND-8 patch are now 8.2.2-P7 and 8.2.3-T9B.
+
+* runmdn now works again.
+
+* mdnconv is improved so that it can nicely convert ACE-encoded text
+ to other encodings. It detects ACE portions of the input string and
+ converts only them, leaving non-ACE portions intact. Previously
+ only RACE had such capability, but now other ACEs also have this
+ capability as long as they have certain prefix/suffix ("bq--" for
+ RACE, for example).
+
Major changes in version 1.2:
mDNkit
- -- multilingual domain name evaluation kit --
- version 1.2
+ -- multilingual domain name evaluation kit --
+ version 1.2.1
Japan Network Information Center (JPNIC)
* Applying patches
This distribution also contains patches for BIND 8.2.2-P7,
-BIND 8.2.3-T6B, BIND 9.0.0 and Squid 2.3.STABLE3. The top of these
+BIND 8.2.3-T9B, BIND 9.0.1 and Squid 2.3.STABLE3. The top of these
patch files describe how to apply the patch and (re)install.
Note that on Solaris, "patch" command that comes with the system
* Contact information
-Please see http//www.nic.ad.jp/jp/research/idn/ for the latest news
+Please see http://www.nic.ad.jp/jp/research/idn/ for the latest news
about this kit.
Bug reports and comments on this kit should be sent to
mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively.
-; $Id: README,v 1.15 2000/11/21 07:54:13 ishisone Exp $
+; $Id: README,v 1.18 2000/12/28 04:09:28 ishisone Exp $
mDNkit
-- ¿¸À¸ì¥É¥á¥¤¥ó̾ɾ²Á¥¥Ã¥È --
- ¥Ð¡¼¥¸¥ç¥ó 1.2
+ ¥Ð¡¼¥¸¥ç¥ó 1.2.1
(¼Ò) ÆüËܥͥåȥ¥¯¥¤¥ó¥Õ¥©¥á¡¼¥·¥ç¥ó¥»¥ó¥¿¡¼ (JPNIC)
* ¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý
-¤³¤ÎÇÛÉÛ¥¥Ã¥È¤Ë¤Ï¡¢bind-8.2.2-P7¡¢bind-8.2.3-T6B¡¢bind-9.0.0¡¢¤ª¤è¤Ó
+¤³¤ÎÇÛÉÛ¥¥Ã¥È¤Ë¤Ï¡¢bind-8.2.2-P7¡¢bind-8.2.3-T9B¡¢bind-9.0.1¡¢¤ª¤è¤Ó
squid-2.3-STABLE3 ¤ËÂФ¹¤ë¥Ñ¥Ã¥Á¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý¤Ï¡¢¥Ñ¥Ã
¥Á¥Õ¥¡¥¤¥ë¤ÎÀèÆ¬¤Ë½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¤½¤Á¤é¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
mdnkit-bugs@nic.ad.jp ¤ª¤è¤Ó idn-cmt@nic.ad.jp ¤Ø¤ª´ê¤¤¤·¤Þ¤¹¡£
-; $Id: README.ja,v 1.18 2000/11/21 07:54:13 ishisone Exp $
+; $Id: README.ja,v 1.20 2000/12/28 04:09:28 ishisone Exp $
-# $Id: Makefile.in,v 1.23 2000/11/21 02:29:52 ishisone Exp $
+# $Id: Makefile.in,v 1.24 2000/12/21 01:57:30 ishisone Exp $
# Copyright (c) 2000 Japan Network Information Center. All rights reserved.
#
# By using this file, you agree to the terms and conditions set forth bellow.
# jurisdiction and venue of Tokyo District Court of Japan.
LIB_CURRENT = 4
-LIB_REVISION = 0
+LIB_REVISION = 1
.SUFFIXES: .lo
#ifndef lint
-static char *rcsid = "$Id: race.c,v 1.14 2000/11/22 01:52:18 ishisone Exp $";
+static char *rcsid = "$Id: race.c,v 1.17 2000/12/26 08:17:01 m-kasahr Exp $";
#endif
/*
return (r);
len = strlen(to);
+
+ /*
+ * RACE doesn't permit encoding a domain name which fits
+ * the host name requirement [STD13].
+ */
+ if (mdn_util_domainspan(to, to + len) == to + len)
+ return (mdn_invalid_encoding);
+
} else {
/*
* Not RACE encoded. Copy verbatim.
unsigned short *buf;
unsigned short local_buf[RACE_BUF_SIZE];
size_t len, reslen;
+ char *reversed_from;
mdn_result_t r;
/*
* Allocate sufficient buffer.
*/
- if (fromlen > RACE_BUF_SIZE) {
- if ((buf = malloc(sizeof(*buf) * fromlen)) == NULL)
+ if (fromlen + 1 > RACE_BUF_SIZE) {
+ if ((buf = malloc(sizeof(*buf) * (fromlen + 1))) == NULL)
return (mdn_nomemory);
} else {
/* Use local buffer. */
r = mdn_buffer_overflow;
goto ret;
}
- to += reslen;
- *to = '\0';
- tolen -= reslen;
+ *(to + reslen) = '\0';
- r = mdn_success;
+ /*
+ * Encode the result, and compare the result with `from', in
+ * order to test whether an input string is encoded correctly.
+ * If `from' was encoded with wrong compression mode, we return
+ * `mdn_invalid_encoding'.
+ */
+ r = race_encode(to, reslen, (char *)buf, fromlen + 1);
+ if (r != mdn_success)
+ goto ret;
+ if (!mdn_util_casematch((char *)buf, from, fromlen)) {
+ r = mdn_invalid_encoding;
+ goto ret;
+ }
ret:
if (buf != local_buf)
}
len = p - buf;
+ /*
+ * The number of unused bits MUST be 4 or less, and all the
+ * bits MUST be zero.
+ */
+ if (bitlen >= 5 || (bitbuf & ((1 << bitlen) - 1)) != 0)
+ return (mdn_invalid_encoding);
+
/*
* Now 'buf' holds the decoded string.
*/
+ /*
+ * RACE doesn't permit an input string with only one octet
+ * (RACE_2OCTET_MODE or a higher octet only).
+ */
+ if (len <= 1)
+ return (mdn_invalid_encoding);
+
/*
* Decompress.
*/
else
buf[j] = buf[i + 1];
i += 2;
+
+ } else if (buf[i] == 0x99 && c == 0x00) {
+ /*
+ * The RACE specification says this is error.
+ */
+ return (mdn_invalid_encoding);
+
} else {
buf[j] = c | buf[i++];
}
mdn_result_t r;
size_t len, buflen;
int compress_mode;
+ int i;
/*
* Convert to UTF-16.
* Now 'p' contains UTF-16 encoded string.
*/
+ /*
+ * Check U+0099.
+ * RACE doesn't permit U+0099 in an input string.
+ */
+ for (i = 0; i < len; i++) {
+ if (p[i] == 0x0099) {
+ r = mdn_invalid_encoding;
+ goto ret;
+ }
+ }
+
/*
* Compress, encode in base-32 and output.
*/
break;
bitbuf <<= (5 - bitlen);
bitlen = 5;
- } else if (i == 0 || compress_mode == compress_one) {
- /* Push 8 bit data into bitbuf. */
- bitbuf = (bitbuf << 8) | (p[i] & 0xff);
- bitlen += 8;
- } else if (compress_mode == compress_two) {
+ } else if (i == 0) {
+ /* Output the first octet (U1 or 0xd8). */
+ bitbuf = p[0];
+ bitlen = 8;
+ } else if (compress_mode == compress_none) {
+ /* Push 16 bit data. */
+ bitbuf = (bitbuf << 16) | p[i];
+ bitlen += 16;
+ } else {/* compress_mode == compress_one/compress_two */
/* Push 8 or 16 bit data. */
- if ((p[i] & 0xff00) == 0) {
- /* Upper octet is zero. */
+ if (compress_mode == compress_two &&
+ (p[i] & 0xff00) == 0) {
+ /* Upper octet is zero (and not U1). */
bitbuf = (bitbuf << 16) | 0xff00 | p[i];
bitlen += 16;
} else if ((p[i] & 0xff) == 0xff) {
(RACE_ESCAPE << 8) | RACE_ESCAPE_2ND;
bitlen += 16;
} else {
+ /* Just output lower octet. */
bitbuf = (bitbuf << 8) | (p[i] & 0xff);
bitlen += 8;
}
- } else { /* compresss_mode == compress_none */
- /* Push 16 bit data. */
- bitbuf = (bitbuf << 16) | p[i];
- bitlen += 16;
}
/*
else
return (compress_one);
}
+
+
#ifndef lint
-static char *rcsid = "$Id: mdnconv.c,v 1.19 2000/09/13 05:55:55 ishisone Exp $";
+static char *rcsid = "$Id: mdnconv.c,v 1.20 2000/12/06 09:46:34 m-kasahr Exp $";
#endif
/*
/* Maxmum number of normalizers */
#define MAX_NORMALIZER 10
-#ifndef MDN_UTF8_ENCODING_NAME
-#define MDN_UTF8_ENCODING_NAME "UTF-8"
-#endif
-
-#ifndef MDN_RACE_ENCODING_NAME
-#define MDN_RACE_ENCODING_NAME "RACE"
-#endif
-
-#ifndef MDN_RACE_PREFIX
-#define MDN_RACE_PREFIX "bq--"
-#endif
-
int line_number; /* current input file line number */
int flush_every_line = 0; /* pretty obvious */
mdn_converter_t conv_in_ctx; /* input converter */
char line1[1024];
char line2[1024];
int nl_trimmed;
- int race_hack;
+ int ace_hack;
- if (strcmp(mdn_converter_localencoding(conv_in_ctx),
- MDN_RACE_ENCODING_NAME) == 0)
- race_hack = 1;
+ if (mdn_converter_isasciicompatible(conv_in_ctx))
+ ace_hack = 1;
else
- race_hack = 0;
+ ace_hack = 0;
line_number = 1;
while (fgets(line1, sizeof(line1), fp) != NULL) {
/*
* Convert input line to UTF-8.
*/
- if (race_hack) {
+ if (ace_hack) {
/*
- * Find portions encoded in RACE using RACE's prefix
- * "bq--", and selectively decode those portions.
+ * Selectively decode those portions.
*/
- r = selective_decode(MDN_RACE_PREFIX,
- line1, line2, 1024);
+ r = selective_decode(line1, line2, 1024);
} else {
r = mdn_converter_localtoutf8(conv_in_ctx,
line1, line2, 1024);
#ifndef lint
-static char *rcsid = "$Id: util.c,v 1.7 2000/11/02 00:45:18 ishisone Exp $";
+static char *rcsid = "$Id: util.c,v 1.9 2000/12/07 02:35:12 m-kasahr Exp $";
#endif
/*
extern void errormsg(const char *fmt, ...);
-static char *find_prefix(const char *str, const char *prefix);
static int ascii_tolower(int c);
mdn_result_t
}
mdn_result_t
-selective_decode(const char *prefix, char *from, char *to, int tolen) {
- char *p;
+selective_decode(char *from, char *to, int tolen) {
+ char *domain_name;
+ char *ignored_chunk;
char save;
int len;
mdn_result_t r;
- while ((p = find_prefix(from, prefix)) != NULL) {
- /*
- * Copy up to the prefix.
- */
- len = p - from;
- if (tolen < len)
- return (mdn_buffer_overflow);
- (void)memcpy(to, from, len);
- from = p;
- to += len;
- tolen -= len;
-
- /*
- * Determine the extent.
- */
- p += strlen(prefix);
- while (('a' <= *p && *p <= 'z') ||
- ('A' <= *p && *p <= 'Z') ||
- ('0' <= *p && *p <= '9') ||
- *p == '-' || *p == '.')
- p++;
-
- /*
- * Convert selected area to UTF-8.
- */
- save = *p;
- *p = '\0';
- r = mdn_converter_localtoutf8(conv_in_ctx, from, to, tolen);
- if (r != mdn_success)
- return (r);
- *p = save;
- from = p;
- len = strlen(to);
- to += len;
- tolen -= len;
- }
+ /*
+ * While `*from' points to a character in a string which may be
+ * a domain name, `domain_name' refers to the beginning of the
+ * domain name.
+ */
+ domain_name = NULL;
/*
- * Copy the rest verbatim.
+ * We ignores a chunk maching to the regular expression:
+ * [\-\.][0-9A-Za-z\-\.]*
+ *
+ * While `*from' points to a character in such a chunk,
+ * `ignored_chunk' refers to the beginning of the chunk.
*/
- len = strlen(from);
- if (tolen < len + 1) /* +1 for NUL */
- return (mdn_buffer_overflow);
- (void)strcpy(to, from);
+ ignored_chunk = NULL;
+
+ for (;;) {
+ if (*from == '-') {
+ /*
+ * We don't recognize `.-' as a part of domain name.
+ */
+ if (domain_name != NULL) {
+ if (*(from - 1) == '.') {
+ ignored_chunk = domain_name;
+ domain_name = NULL;
+ }
+ } else if (ignored_chunk == NULL) {
+ ignored_chunk = from;
+ }
+
+ } else if (*from == '.') {
+ /*
+ * We don't recognize `-.' nor `..' as a part of
+ * domain name.
+ */
+ if (domain_name != NULL) {
+ if (*(from - 1) == '-' || *(from - 1) == '.') {
+ ignored_chunk = domain_name;
+ domain_name = NULL;
+ }
+ } else if (ignored_chunk == NULL) {
+ ignored_chunk = from;
+ }
+
+ } else if (('a' <= *from && *from <= 'z') ||
+ ('A' <= *from && *from <= 'Z') ||
+ ('0' <= *from && *from <= '9')) {
+ if (ignored_chunk == NULL && domain_name == NULL)
+ domain_name = from;
+
+ } else {
+ if (ignored_chunk != NULL) {
+ /*
+ * `from' reaches the end of the ignored chunk.
+ * Copy the chunk to `to'.
+ */
+ len = from - ignored_chunk;
+ if (tolen < len)
+ return (mdn_buffer_overflow);
+ (void)memcpy(to, ignored_chunk, len);
+ to += len;
+ tolen -= len;
+
+ } else if (domain_name != NULL) {
+ /*
+ * `from' reaches the end of the domain name.
+ * Decode the domain name, and copy the result
+ * to `to'.
+ */
+ save = *from;
+ *from = '\0';
+ r = mdn_converter_localtoutf8(conv_in_ctx,
+ domain_name, to,
+ tolen);
+ *from = save;
+
+ if (r == mdn_success) {
+ len = strlen(to);
+ } else if (r == mdn_invalid_encoding) {
+ len = from - domain_name;
+ if (tolen < len)
+ return (mdn_buffer_overflow);
+ (void)memcpy(to, domain_name, len);
+ } else {
+ return (r);
+ }
+ to += len;
+ tolen -= len;
+
+ }
+
+ /*
+ * Copy a character `*from' to `to'.
+ */
+ if (tolen < 1)
+ return (mdn_buffer_overflow);
+ *to = *from;
+ to++;
+ tolen--;
+
+ domain_name = NULL;
+ ignored_chunk = NULL;
+
+ if (*from == '\0')
+ break;
+ }
+
+ from++;
+ }
return (mdn_success);
}
else
return (c);
}
-
-static char *
-find_prefix(const char *str, const char *prefix) {
- int top = ascii_tolower(prefix[0]);
- size_t plen = strlen(prefix);
-
- while (*str != '\0') {
- if ((*str == top || ascii_tolower(*str) == top) &&
- mdn_util_casematch(str, prefix, plen))
- return ((char *)str);
- str++;
- }
- return (NULL);
-}
-/* $Id: util.h,v 1.2 2000/08/23 07:01:05 ishisone Exp $ */
+/* $Id: util.h,v 1.3 2000/12/06 09:46:35 m-kasahr Exp $ */
/*
* Copyright (c) 2000 Japan Network Information Center. All rights reserved.
*
const char *zld, int auto_zld);
extern void canonical_zld(char *s, const char *zld);
extern int zld_match(const char *s, const char *zld);
-extern mdn_result_t selective_decode(const char *prefix,
- char *from, char *to, int tolen);
+extern mdn_result_t selective_decode(char *from, char *to, int tolen);
extern int initialize_converter(const char *in_code,
const char *out_code,
const char *encoding_alias);
%define name mdnkit
-%define version 1.2
+%define version 1.2.1
%define disttop %{name}-%{version}-src
%define bind_version 8.2.2-P7
-%define serial 2000112701
+%define serial 2000122101
Name: %{name}
Version: %{version}
#NoSource: 10
#NoSource: 11
#NoSource: 12
-#Patch0: dnsproxy.patch1
+#Patch0: mdnkit-1.2-runmdn.patch
BuildRoot: /var/tmp/%{name}-root
Serial: %{serial}
Summary: multilingual Domain Name evaluation kit (mDNkit/JPNIC)
%prep
%setup -n %{disttop}
-#%patch0 -p0 -b .patch1
+#%patch0 -p1 -b .runmdn
%build
if [ -f /usr/lib/libiconv.a -o -f /usr/lib/libiconv.so ]
then
- ICONV="--with-iconv=yes"
+ if [ -f /lib/libc-2.0* ]
+ then
+ ICONV="--with-iconv=yes"
+ fi
fi
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --sysconfdir=/etc $ICONV
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/include
+mkdir -p $RPM_BUILD_ROOT/var/dnsproxy
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
make prefix=$RPM_BUILD_ROOT/usr ETCDIR=$RPM_BUILD_ROOT/etc install
# make prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc install
rm -fr $RPM_BUILD_ROOT
%changelog
+* Mon Dec 6 2000 MANABE Takashi <manabe@dsl.gr.jp>
+- add brace/lace functions to libmdnresolv(mdnkit-1.2-runmdn.patch)
+- include /var/dnsproxy
+- change files section for compressed man pages
+
* Mon Nov 27 2000 Makoto Ishisone <ishisone@sra.co.jp>
- 1.2 release
%files
%defattr(-, root, root)
/usr/sbin/dnsproxy
+/var/dnsproxy
/usr/bin/mdnconv
/usr/bin/runmdn
/etc/rc.d/init.d/dnsproxy
/usr/lib/libmdnresolv.la
%attr(0644, root, root) %config(noreplace) /etc/dnsproxy.conf
%attr(0644, root, root) /etc/mdnres.conf.sample
-%attr(0644, root, man) /usr/man/man1/mdnconv.1
-%attr(0644, root, man) /usr/man/man1/runmdn.1
-%attr(0644, root, man) /usr/man/man5/mdnres.conf.5
-%attr(0644, root, man) /usr/man/man8/dnsproxy.8
+%attr(0644, root, man) /usr/man/man1/*
+%attr(0644, root, man) /usr/man/man5/*
+%attr(0644, root, man) /usr/man/man8/*
%doc rpm_docs/*
%files devel
-# $Id: Makefile.in,v 1.12 2000/11/21 02:29:53 ishisone Exp $
+# $Id: Makefile.in,v 1.14 2000/12/21 01:57:31 ishisone Exp $
# Copyright (c) 2000 Japan Network Information Center. All rights reserved.
#
# By using this file, you agree to the terms and conditions set forth bellow.
# jurisdiction and venue of Tokyo District Court of Japan.
LIB_CURRENT=4
-LIB_REVISION=0
+LIB_REVISION=1
.SUFFIXES: .lo
MDNDIR = ../../lib
MDNOBJS = \
+ $(MDNDIR)/brace.lo \
$(MDNDIR)/converter.lo \
$(MDNDIR)/debug.lo \
$(MDNDIR)/dn.lo \
+ $(MDNDIR)/lace.lo \
$(MDNDIR)/localencoding.lo \
$(MDNDIR)/log.lo \
$(MDNDIR)/normalizer.lo \