Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package whois

There is some noise not related to Debian, all the relevant changes
are related to the database.

unblock whois/5.2.15

diff -Nru whois-5.2.14/config.h whois-5.2.15/config.h
--- whois-5.2.14/config.h       2015-01-09 03:49:00.000000000 +0100
+++ whois-5.2.15/config.h       2017-02-27 00:37:41.000000000 +0100
@@ -13,6 +13,10 @@
 
 
 /* autoconf in cpp macros */
+#if defined __NetBSD__ || __OpenBSD__
+# include <sys/param.h>
+#endif
+
 #ifdef linux
 # define ENABLE_NLS
 #endif
@@ -85,7 +89,7 @@
 #if (defined __FreeBSD__ && __FreeBSD__ >= 9) || \
     (defined __NetBSD__  && __NetBSD_Version__ >= 600000000) || \
     (defined OpenBSD && OpenBSD >= 200805) || \
-    (defined __APPLE__ && defined __MACH__)
+    (defined __APPLE__ && defined __MACH__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 
1070)
 # define HAVE_ARC4RANDOM_BUF
 # undef RANDOM_DEVICE
 #endif
diff -Nru whois-5.2.14/debian/changelog whois-5.2.15/debian/changelog
--- whois-5.2.14/debian/changelog       2016-12-29 23:12:19.000000000 +0100
+++ whois-5.2.15/debian/changelog       2017-02-27 00:37:41.000000000 +0100
@@ -1,3 +1,14 @@
+whois (5.2.15) unstable; urgency=medium
+
+  * Updated the .gf and .mq TLD servers.
+  * Updated the list of new gTLDs.
+  * Updated the charset for whois.nic.kz.
+  * Fixed multiple portability issues on non-Linux platforms.
+  * Fixed a lot of minor compiler warnings with no practical effects.
+  * Added support for libidn2, not enabled yet.
+
+ -- Marco d'Itri <m...@linux.it>  Mon, 27 Feb 2017 00:37:41 +0100
+
 whois (5.2.14) unstable; urgency=medium
 
   * Updated the .ar, .bm and .fm TLD servers.
diff -Nru whois-5.2.14/Makefile whois-5.2.15/Makefile
--- whois-5.2.14/Makefile       2016-03-29 05:37:17.000000000 +0200
+++ whois-5.2.15/Makefile       2017-02-27 00:37:41.000000000 +0100
@@ -15,7 +15,7 @@
 # FreeBSD
 #whois_LDADD += -liconv
 #LIBS += -L/usr/local/lib -lintl
-#INCLUDES += -I/usr/local/include
+#DEFS += -I/usr/local/include
 
 # OS/2 EMX
 #whois_LDADD += -lsocket
@@ -32,10 +32,15 @@
 DEFS += -DLOCALEDIR=\"$(BASEDIR)$(prefix)/share/locale\"
 endif
 
+ifdef HAVE_LIBIDN2
+whois_LDADD += -lidn2
+DEFS += -DHAVE_LIBIDN2
+else
 ifdef HAVE_LIBIDN
 whois_LDADD += -lidn
 DEFS += -DHAVE_LIBIDN
 endif
+endif
 
 ifdef HAVE_ICONV
 whois_OBJECTS += simple_recode.o
diff -Nru whois-5.2.14/mkpasswd.c whois-5.2.15/mkpasswd.c
--- whois-5.2.14/mkpasswd.c     2016-03-29 05:37:17.000000000 +0200
+++ whois-5.2.15/mkpasswd.c     2017-02-27 00:37:41.000000000 +0100
@@ -32,6 +32,7 @@
 #endif
 #include <fcntl.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 #include <sys/types.h>
 #ifdef HAVE_XCRYPT
@@ -123,7 +124,7 @@
 
 void generate_salt(char *const buf, const unsigned int len);
 void *get_random_bytes(const unsigned int len);
-void display_help(int error);
+void NORETURN display_help(int error);
 void display_version(void);
 void display_methods(void);
 
@@ -150,7 +151,7 @@
     /* prepend options from environment */
     argv = merge_args(getenv("MKPASSWD_OPTIONS"), argv, &argc);
 
-    while ((ch = GETOPT_LONGISH(argc, argv, "hH:m:5P:R:sS:V", longopts, 0))
+    while ((ch = GETOPT_LONGISH(argc, argv, "hH:m:5P:R:sS:V", longopts, NULL))
            > 0) {
        switch (ch) {
        case '5':
@@ -363,7 +364,8 @@
 void* get_random_bytes(const unsigned int count)
 {
     char *buf;
-    int fd, bytes_read;
+    int fd;
+    ssize_t bytes_read;
 
     buf = NOFAIL(malloc(count));
     fd = open(RANDOM_DEVICE, O_RDONLY);
@@ -394,7 +396,7 @@
     unsigned char *entropy;
 
 #if defined HAVE_ARC4RANDOM_BUF
-    void *entropy = NOFAIL(malloc(len));
+    entropy = NOFAIL(malloc(len));
     arc4random_buf(entropy, len);
 #else
     entropy = get_random_bytes(len);
@@ -436,7 +438,7 @@
 
 #endif /* RANDOM_DEVICE || HAVE_ARC4RANDOM_BUF */
 
-void display_help(int error)
+void NORETURN display_help(int error)
 {
     fprintf((EXIT_SUCCESS == error) ? stdout : stderr,
            _("Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]\n"
diff -Nru whois-5.2.14/new_gtlds_list whois-5.2.15/new_gtlds_list
--- whois-5.2.14/new_gtlds_list 2016-12-29 23:11:41.000000000 +0100
+++ whois-5.2.15/new_gtlds_list 2017-02-27 00:37:41.000000000 +0100
@@ -28,6 +28,7 @@
 aetna
 afamilycompany
 afl
+africa
 agakhan
 agency
 aig
diff -Nru whois-5.2.14/servers_charset_list whois-5.2.15/servers_charset_list
--- whois-5.2.14/servers_charset_list   2016-12-29 22:29:49.000000000 +0100
+++ whois-5.2.15/servers_charset_list   2017-02-27 00:37:41.000000000 +0100
@@ -36,9 +36,7 @@
 whois.domain.kg                cp1251
 whois.nic.or.kr                utf-8
 whois.kr               utf-8
-# XXX I had to guess: the server is unable to fully transcode U+49b in the
-# answer for xn--e1aybc.xn--80ao21a. Maybe it is cp1251 instead?
-whois.nic.kz           rk1048
+whois.nic.kz           utf-8
 whois.nic.li           utf-8
 whois.domreg.lt                utf-8
 whois.dns.lu           iso-8859-1
diff -Nru whois-5.2.14/tld_serv_list whois-5.2.15/tld_serv_list
--- whois-5.2.14/tld_serv_list  2016-12-29 23:11:41.000000000 +0100
+++ whois-5.2.15/tld_serv_list  2017-02-27 00:37:41.000000000 +0100
@@ -147,7 +147,7 @@
 .gb    NONE
 .gd    whois.nic.gd
 .ge    WEB http://www.registration.ge/
-.gf    WEB https://www.dom-enic.com/whois.html
+.gf    whois.mediaserv.net
 .gg    whois.gg
 .gh    WEB http://www.nic.gh/customer/search_c.htm
 .gi    whois2.afilias-grs.net
@@ -217,7 +217,7 @@
 .mn    whois.nic.mn
 .mo    WEB http://www.monic.mo/        # whois.monic.mo is restricted
 .mp    NONE            # get.mp
-.mq    WEB https://www.dom-enic.com/whois.html
+.mq    whois.mediaserv.net
 .mr    NONE            # www.nic.mr
 .ms    whois.nic.ms
 .mt    WEB https://www.nic.org.mt/dotmt/ # whois.nic.org.mt is restricted
@@ -375,6 +375,7 @@
 .xn--mgb9awbf          whois.registry.om       # Oman
 .xn--mgba3a4f16a       whois.nic.ir            # Iran
 .xn--mgbaam7a8h                whois.aeda.net.ae       # United Arab Emirates
+.xn--mgbai9azgqp6j     NONE                    # Pakistan
 .xn--mgbayh7gpa                WEB http://idn.jo/whois_a.aspx  # Jordan
 .xn--mgbbh1a71e                whois.inregistry.net    # India, Urdu AW
 .xn--mgbc0a9azcg       NONE                    # Morocco
diff -Nru whois-5.2.14/utils.c whois-5.2.15/utils.c
--- whois-5.2.14/utils.c        2013-03-30 02:31:41.000000000 +0100
+++ whois-5.2.15/utils.c        2017-02-27 00:37:41.000000000 +0100
@@ -46,7 +46,8 @@
 {
     char *arg, *argstring;
     char **newargs = NULL;
-    unsigned int i, num_env = 0;
+    int i;
+    unsigned int num_env = 0;
 
     if (!args)
        return argv;
@@ -72,7 +73,7 @@
 }
 
 /* Error routines */
-void err_sys(const char *fmt, ...)
+void NORETURN err_sys(const char *fmt, ...)
 {
     va_list ap;
 
@@ -83,7 +84,7 @@
     exit(2);
 }
 
-void err_quit(const char *fmt, ...)
+void NORETURN err_quit(const char *fmt, ...)
 {
     va_list ap;
 
diff -Nru whois-5.2.14/utils.h whois-5.2.15/utils.h
--- whois-5.2.14/utils.h        2016-03-29 05:37:17.000000000 +0200
+++ whois-5.2.15/utils.h        2017-02-27 00:37:41.000000000 +0100
@@ -49,12 +49,15 @@
 # define ngettext(a, b, c) ((c==1) ? (a) : (b))
 #endif
 
+#if defined IDN2_VERSION_NUMBER && IDN2_VERSION_NUMBER < 0x00140000
+# define IDN2_NONTRANSITIONAL IDN2_NFC_INPUT
+#endif
 
 /* Prototypes */
 void *do_nofail(void *ptr, const char *file, const int line);
 char **merge_args(char *args, char *argv[], int *argc);
 
-void err_quit(const char *fmt, ...) NORETURN;
-void err_sys(const char *fmt, ...) NORETURN;
+void NORETURN err_quit(const char *fmt, ...);
+void NORETURN err_sys(const char *fmt, ...);
 
 #endif
diff -Nru whois-5.2.14/version.h whois-5.2.15/version.h
--- whois-5.2.14/version.h      2016-10-30 18:50:07.000000000 +0100
+++ whois-5.2.15/version.h      2017-02-27 00:37:41.000000000 +0100
@@ -1 +1 @@
-#define VERSION "5.2.13"
+#define VERSION "5.2.15"
diff -Nru whois-5.2.14/whois.c whois-5.2.15/whois.c
--- whois-5.2.14/whois.c        2016-10-30 18:49:57.000000000 +0100
+++ whois-5.2.15/whois.c        2017-02-27 00:37:41.000000000 +0100
@@ -31,7 +31,9 @@
 #ifdef HAVE_REGEXEC
 #include <regex.h>
 #endif
-#ifdef HAVE_LIBIDN
+#ifdef HAVE_LIBIDN2
+#include <idn2.h>
+#elif defined HAVE_LIBIDN
 #include <idna.h>
 #endif
 #ifdef HAVE_INET_PTON
@@ -126,7 +128,8 @@
     int longindex;
 #endif
 
-    int ch, nopar = 0, fstringlen = 64;
+    int ch, nopar = 0;
+    size_t fstringlen = 64;
     const char *server = NULL, *port = NULL;
     char *qstring, *fstring;
     int ret;
@@ -653,7 +656,7 @@
        simple_recode_input_charset = "utf-8";  /* then try UTF-8 */
 #endif
 
-#ifdef HAVE_LIBIDN
+#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
 # define DENIC_PARAM_ACE ",ace"
 #else
 # define DENIC_PARAM_ACE ""
@@ -939,9 +942,7 @@
     hints.ai_family = AF_UNSPEC;
     hints.ai_socktype = SOCK_STREAM;
     hints.ai_flags = AI_ADDRCONFIG;
-#ifdef HAVE_LIBIDN
     hints.ai_flags |= AI_IDN;
-#endif
 
     if ((err = getaddrinfo(server, port ? port : "nicname", &hints, &res))
            != 0) {
@@ -1050,13 +1051,13 @@
     return 0;
 }
 
-void alarm_handler(int signum)
+void NORETURN alarm_handler(int signum)
 {
     close(sockfd);
     err_quit(_("Timeout."));
 }
 
-void sighandler(int signum)
+void NORETURN sighandler(int signum)
 {
     close(sockfd);
     err_quit(_("Interrupted by signal %d..."), signum);
@@ -1133,7 +1134,7 @@
        if (in_domain(s, new_gtlds[i]))
            return new_gtlds[i];
 
-    return 0;
+    return NULL;
 }
 
 /*
@@ -1145,7 +1146,7 @@
 char *normalize_domain(const char *dom)
 {
     char *p, *ret;
-#ifdef HAVE_LIBIDN
+#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
     char *domain_start = NULL;
 #endif
 
@@ -1160,7 +1161,7 @@
        p--;
     }
 
-#ifdef HAVE_LIBIDN
+#if defined HAVE_LIBIDN || defined HAVE_LIBIDN2
     /* find the start of the last word if there are spaces in the query */
     for (p = ret; *p; p++)
        if (*p == ' ')
@@ -1170,8 +1171,13 @@
        char *q, *r;
        int prefix_len;
 
+#ifdef HAVE_LIBIDN2
+       if (idn2_lookup_ul(domain_start, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
+           return ret;
+#else
        if (idna_to_ascii_lz(domain_start, &q, 0) != IDNA_SUCCESS)
            return ret;
+#endif
 
        /* reassemble the original query in a new buffer */
        prefix_len = domain_start - ret;
@@ -1186,8 +1192,13 @@
     } else {
        char *q;
 
+#ifdef HAVE_LIBIDN2
+       if (idn2_lookup_ul(ret, &q, IDN2_NONTRANSITIONAL) != IDN2_OK)
+           return ret;
+#else
        if (idna_to_ascii_lz(ret, &q, 0) != IDNA_SUCCESS)
            return ret;
+#endif
 
        free(ret);
        return q;
@@ -1232,7 +1243,7 @@
     }
 
     /* change the server name to lower case */
-    for (p = (char *) *server; *p && *p != '\0'; p++)
+    for (p = (char *) *server; *p; p++)
        *p = tolower(*p);
 }
 
@@ -1268,7 +1279,7 @@
     }
 
     new = malloc(sizeof("255.255.255.255"));
-    sprintf(new, "%d.%d.%d.%d", a >> 8, a & 0xff, b >> 8, b & 0xff);
+    sprintf(new, "%ud.%ud.%ud.%ud", a >> 8, a & 0xff, b >> 8, b & 0xff);
 #endif
 
     return new;
@@ -1298,7 +1309,7 @@
     a ^= 0xffff;
     b ^= 0xffff;
     new = malloc(sizeof("255.255.255.255"));
-    sprintf(new, "%d.%d.%d.%d", a >> 8, a & 0xff, b >> 8, b & 0xff);
+    sprintf(new, "%ud.%ud.%ud.%ud", a >> 8, a & 0xff, b >> 8, b & 0xff);
 #endif
 
     return new;
@@ -1378,7 +1389,7 @@
 
 /* http://www.ripe.net/ripe/docs/databaseref-manual.html */
 
-void usage(int error)
+void NORETURN usage(int error)
 {
     fprintf((EXIT_SUCCESS == error) ? stdout : stderr, _(
 "Usage: whois [OPTION]... OBJECT...\n\n"
diff -Nru whois-5.2.14/whois.h whois-5.2.15/whois.h
--- whois-5.2.14/whois.h        2015-06-08 02:20:37.000000000 +0200
+++ whois-5.2.15/whois.h        2017-02-27 00:37:41.000000000 +0100
@@ -1,3 +1,5 @@
+#include "utils.h"
+
 /* 6bone referto: extension */
 #define REFERTO_FORMAT "%% referto: whois -h %255s -p %15s %1021[^\n\r]"
 
@@ -21,9 +23,9 @@
 char *query_afilias(const int, const char *);
 int openconn(const char *, const char *);
 int connect_with_timeout(int, const struct sockaddr *, socklen_t, int);
-void usage(int error);
-void alarm_handler(int);
-void sighandler(int);
+void NORETURN usage(int error);
+void NORETURN alarm_handler(int);
+void NORETURN sighandler(int);
 int japanese_locale(void);
 unsigned long myinet_aton(const char *);
 unsigned long asn32_to_long(const char *);

-- 
ciao,
Marco

Reply via email to