[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#682087: marked as done (unblock: skksearch/0.0-21)



Your message dated Sat, 15 Sep 2012 20:07:16 +0200
with message-id <20120915180716.GO5308@radis.cristau.org>
and subject line Re: Bug#682087: unblock: skksearch/0.0-21
has caused the Debian Bug report #682087,
regarding unblock: skksearch/0.0-21
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 owner@bugs.debian.org
immediately.)


-- 
682087: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682087
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock skksearch/0.0-20 to enable hardening flags for wheezy.

Changes:

  * Use dpkg-buildflags to support hardening flags
  * debian/patches/*: Add DEP-3 header fields, and renumbered
  * Update copyright-format version to 1.0
  * Update Vcs-* to anonscm.debian.org
  * Update Standards-Version to 3.9.3

Note that the diff has increased because of renaming debian/patches/*,
but there isn't a new patch.

See also the attached debdiff.

unblock skksearch/0.0-20

Thanks,
--
Tatsuya Kinoshita
diffstat for skksearch-0.0 skksearch-0.0

 changelog                                    |   10 ++
 control                                      |    6 -
 copyright                                    |    4 -
 patches/010_conf-file.patch                  |   74 ++++++++++++++++++++
 patches/020_plain-search.patch               |   18 +++++
 patches/030_db4.3.patch                      |   96 +++++++++++++++++++++++++++
 patches/040_dic-bufsize.patch                |   17 ++++
 patches/050_build-warnings.patch             |   49 +++++++++++++
 patches/clean-build-errors-and-warnings.diff |   50 --------------
 patches/conf-file.diff                       |   73 --------------------
 patches/db4.3.diff                           |   95 --------------------------
 patches/dic-bufsize.diff                     |   16 ----
 patches/plain-search.diff                    |   67 ------------------
 patches/series                               |   10 +-
 rules                                        |    9 +-
 15 files changed, 281 insertions(+), 313 deletions(-)

diff -Nru skksearch-0.0/debian/changelog skksearch-0.0/debian/changelog
--- skksearch-0.0/debian/changelog	2011-05-10 21:43:02.000000000 +0900
+++ skksearch-0.0/debian/changelog	2012-07-08 13:28:42.000000000 +0900
@@ -1,3 +1,13 @@
+skksearch (0.0-20) unstable; urgency=low
+
+  * Use dpkg-buildflags to support hardening flags
+  * debian/patches/*: Add DEP-3 header fields, and renumbered
+  * Update copyright-format version to 1.0
+  * Update Vcs-* to anonscm.debian.org
+  * Update Standards-Version to 3.9.3
+
+ -- Tatsuya Kinoshita <tats@debian.org>  Sun, 08 Jul 2012 13:28:30 +0900
+
 skksearch (0.0-19) unstable; urgency=low
 
   [ Tatsuya Kinoshita ]
diff -Nru skksearch-0.0/debian/control skksearch-0.0/debian/control
--- skksearch-0.0/debian/control	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/control	2012-07-08 13:24:37.000000000 +0900
@@ -3,9 +3,9 @@
 Priority: extra
 Maintainer: Tatsuya Kinoshita <tats@debian.org>
 Build-Depends: cdbs, debhelper (>= 6), libdb-dev, libcdb-dev
-Standards-Version: 3.9.2
-Vcs-Git: git://git.debian.org/git/collab-maint/skksearch.git
-Vcs-Browser: http://git.debian.org/?p=collab-maint/skksearch.git
+Standards-Version: 3.9.3
+Vcs-Git: git://anonscm.debian.org/collab-maint/skksearch.git
+Vcs-Browser: http://anonscm.debian.org/git/collab-maint/skksearch.git
 
 Package: skksearch
 Architecture: any
diff -Nru skksearch-0.0/debian/copyright skksearch-0.0/debian/copyright
--- skksearch-0.0/debian/copyright	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/copyright	2012-07-08 13:24:37.000000000 +0900
@@ -1,4 +1,4 @@
-Format: http://dep.debian.net/deps/dep5
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: skksearch
 Source: http://www.sato.kuis.kyoto-u.ac.jp/~sakurada/hack/skk/skksearch-0.0.tar.gz
 Comment: The upstream site no longer exists.
@@ -15,7 +15,7 @@
  version 2, can be found in `/usr/share/common-licenses/GPL-2'.
 
 Files: debian/*
-Copyright: 2006-2011, Tatsuya Kinoshita <tats@debian.org>
+Copyright: 2006-2012, Tatsuya Kinoshita <tats@debian.org>
 	   2006-2007, Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>
 	   2005-2006, Kenshi Muto <kmuto@debian.org>
 	   2005, Matej Vela <vela@debian.org>
diff -Nru skksearch-0.0/debian/patches/010_conf-file.patch skksearch-0.0/debian/patches/010_conf-file.patch
--- skksearch-0.0/debian/patches/010_conf-file.patch	1970-01-01 09:00:00.000000000 +0900
+++ skksearch-0.0/debian/patches/010_conf-file.patch	2012-07-08 13:24:27.000000000 +0900
@@ -0,0 +1,74 @@
+Description: Add support for a configuration file
+Origin: http://lists.debian.or.jp/debian-users/200011/msg00532.html
+Author: Fumitoshi UKAI <ukai@debian.or.jp>
+
+Index: skksearch-0.0/main.c
+===================================================================
+--- skksearch-0.0.orig/main.c	Fri Dec  8 11:03:41 2000
++++ skksearch-0.0/main.c	Fri Dec  8 11:04:31 2000
+@@ -67,11 +67,12 @@
+   char *p;
+   int errflag = 0;
+   int terminal = 0;
++  char *conf = NULL;
+   extern char *optarg;
+   extern int optind;
+ 
+   /* process arguments */
+-  while ((c = getopt(argc, argv, "l:f:sit")) != EOF) {
++  while ((c = getopt(argc, argv, "l:f:sic:t")) != EOF) {
+    switch (c) {
+     case 'l':
+       loglevel = atoi(optarg);
+@@ -84,13 +85,16 @@
+       break;
+     case 't':
+       terminal = 1;
++    case 'c':
++      conf = optarg;
++      break;
+     case '?':
+       errflag = 1;
+     }
+   }
+   if (errflag) {
+     fprintf(stderr,
+-	    "usage: %s [-l digit] [-f logfile] [-s] dictinary1 ... \n",
++	    "usage: %s [-l digit] [-f logfile] [-s] [-c config] [dictinary1 ...] \n",
+ 	    argv[0]);
+     exit(1);
+   }
+@@ -107,6 +111,33 @@
+   for (i = 0; i < dicnum; i++) {
+     err(LOG_DEBUG, "openning dictionary %s", argv[optind + i]);
+     diclist[i] = dic_open(argv[optind + i]);
++  }
++  if (conf != NULL) {
++     FILE *fp;
++     char line[1024];
++     char *p;
++     fp = fopen(conf, "r");
++     if (fp == NULL) {
++	err(LOG_ERR, "cannot open config file `%s'\n", conf);
++	exit(1);
++     }
++     while ((p = fgets(line, sizeof(line), fp)) != NULL) {
++	if (p[0] == '#' || p[0] == '\n') 
++	    continue;
++	p[strlen(p)-1] = '\0'; /* chop */
++	if (i >= MAXDICNUM) {
++	    err(LOG_ERR, "too many dicts in config file\n");
++	    exit(1);
++	}
++	err(LOG_DEBUG, "openning dictionary %s", p);
++	dicnum++;
++	diclist[i++] = dic_open(p);
++     }
++     fclose(fp);
++  }
++  if (dicnum == 0) {
++     err(LOG_ERR, "no dict specified\n");
++     exit(1);
+   }
+ 
+   /* main loop */
diff -Nru skksearch-0.0/debian/patches/020_plain-search.patch skksearch-0.0/debian/patches/020_plain-search.patch
--- skksearch-0.0/debian/patches/020_plain-search.patch	1970-01-01 09:00:00.000000000 +0900
+++ skksearch-0.0/debian/patches/020_plain-search.patch	2012-07-08 13:24:27.000000000 +0900
@@ -0,0 +1,18 @@
+Description: Prevent an infinite loop in dic_plain_search
+Origin: http://mail.ring.gr.jp/skk/200309/msg00003.html
+Bug-Debian: http://bugs.debian.org/209217
+Author: KIHARA Hideto <deton@m1.interq.or.jp>
+
+Index: skksearch-0.0/dic_plain.c
+===================================================================
+--- skksearch-0.0.orig/dic_plain.c	Fri Dec 15 18:06:06 2000
++++ skksearch-0.0/dic_plain.c	Sat Feb 22 23:04:10 2003
+@@ -118,7 +118,7 @@
+   while (1) {
+     fseek(fp, (end + begin) / 2, SEEK_SET); /* center */
+     fgets(buf, DIC_BUFSIZE, fp); /* Skip */
+-    if ((half = ftell(fp)) == end) {
++    if ((half = ftell(fp)) >= end) {
+       break;			/* goto linear search */
+     }
+     fgets(buf, DIC_BUFSIZE, fp);
diff -Nru skksearch-0.0/debian/patches/030_db4.3.patch skksearch-0.0/debian/patches/030_db4.3.patch
--- skksearch-0.0/debian/patches/030_db4.3.patch	1970-01-01 09:00:00.000000000 +0900
+++ skksearch-0.0/debian/patches/030_db4.3.patch	2012-07-08 13:24:27.000000000 +0900
@@ -0,0 +1,96 @@
+Description: Port to Berkeley DB 4.3
+Bug-Debian: http://bugs.debian.org/248521
+Author: Matej Vela <vela@debian.org>
+
+Index: skksearch-0.0/dic_db.c
+===================================================================
+--- skksearch-0.0.orig/dic_db.c	2005-11-12 19:49:38.000000000 +0100
++++ skksearch-0.0/dic_db.c	2005-11-12 19:55:03.000000000 +0100
+@@ -23,19 +23,21 @@
+ 
+ /* BerkeleyDB environment */
+ int env_initialized = 0;
+-DB_ENV env;
+-void errcall(const char *, char *);
++DB_ENV *env;
++void errcall(const DB_ENV *, const char *, const char *);
+ 
+ 
+ struct dic *dic_db_open(struct dic *d, char *path) {
++  int ret;
+   struct dic_db_internal *internal;
+ 
+   if (!env_initialized) {
+-    env.db_errcall = errcall;
+-    if ((errno = db_appinit(NULL, NULL, &env, DB_USE_ENVIRON)) != 0) {
+-      err(LOG_ERR, "dic_db_open: db_appinit failed\n");
++    if ((ret = db_env_create(&env, 0)) != 0
++	|| (ret = env->open(env, NULL, 0, DB_USE_ENVIRON)) != 0) {
++      err(LOG_ERR, "dic_db_open: %s\n", db_strerror(ret));
+       exit(1);
+     }
++    env->set_errcall(env, errcall);
+     env_initialized = 1;
+   }
+ 
+@@ -45,10 +47,10 @@
+   }
+   memset(internal, 0, sizeof(struct dic_db_internal));
+ 
+-  if ((errno =
+-       db_open(path, DB_UNKNOWN, DB_RDONLY, 0, &env, NULL, &(internal->db)))
+-      != 0) {
+-    err(LOG_ERR, "dic_db_open(%s): %s\n", path, strerror(errno));
++  if ((ret = db_create(&(internal->db), env, 0)) != 0
++      || (ret = internal->db->open(internal->db, NULL, path, NULL,
++				   DB_UNKNOWN, DB_RDONLY, 0)) != 0) {
++    err(LOG_ERR, "dic_db_open(%s): %s\n", path, db_strerror(ret));
+     exit(1);
+   }
+   d->internal = (void *)internal;
+@@ -58,6 +60,7 @@
+   }
+ 
+ char *dic_db_search(struct dic *d, char *keystr, int keylen) {
++  int ret;
+   struct dic_db_internal *internal = (struct dic_db_internal *)(d->internal);
+   DB *db = internal->db;
+   DBT key;
+@@ -71,23 +74,24 @@
+   data.ulen = DIC_BUFSIZE - 1;	/* -1 for '\0' */
+   data.flags = DB_DBT_USERMEM;
+ 
+-  if ((errno = db->get(db, NULL, &key, &data, 0)) == DB_NOTFOUND) {
++  if ((ret = db->get(db, NULL, &key, &data, 0)) == DB_NOTFOUND) {
+     return NULL;
+-  } else if (errno == 0) {	/* found */
++  } else if (ret == 0) {	/* found */
+     *((char *)(data.data) + data.size) = '\0';
+     return (char *)(data.data);
+   } else {
+     err(LOG_WARNING, "dic_db_search: %s (may be too long entry)\n",
+-	strerror(errno));
++	db_strerror(ret));
+     return NULL;
+   }
+ }
+ 
+ 
+ int dic_db_close(struct dic *d) {
++  int ret;
+   DB *db = ((struct dic_db_internal *)(d->internal))->db;
+-  if ((errno = db->close(db, 0)) != 0) {
+-    err(LOG_ERR, "dic_db_close: %s\n", strerror(errno));
++  if ((ret = db->close(db, 0)) != 0) {
++    err(LOG_ERR, "dic_db_close: %s\n", db_strerror(ret));
+     exit(1);
+   }
+   free(d->internal);
+@@ -96,6 +100,6 @@
+ }
+ 
+ 
+-void errcall(const char *foo, char *message) {
++void errcall(const DB_ENV *dbenv, const char *foo, const char *message) {
+   err(LOG_ERR, "dic_db: %s\n", message);
+ }
diff -Nru skksearch-0.0/debian/patches/040_dic-bufsize.patch skksearch-0.0/debian/patches/040_dic-bufsize.patch
--- skksearch-0.0/debian/patches/040_dic-bufsize.patch	1970-01-01 09:00:00.000000000 +0900
+++ skksearch-0.0/debian/patches/040_dic-bufsize.patch	2012-07-08 13:24:27.000000000 +0900
@@ -0,0 +1,17 @@
+Description: Increase DIC_BUFSIZE to support long entries
+Bug-Debian: http://bugs.debian.org/376855
+Author: SATOH Fumiyasu <fumiya@samba.gr.jp>
+
+Index: skksearch-0.0/dic.h
+===================================================================
+--- skksearch-0.0.orig/dic.h
++++ skksearch-0.0/dic.h
+@@ -12,7 +12,7 @@
+  * GNU General Public License for more details.
+  */
+ 
+-#define DIC_BUFSIZE 1024
++#define DIC_BUFSIZE 4096
+ 
+ struct dic {
+   char buf[DIC_BUFSIZE];
diff -Nru skksearch-0.0/debian/patches/050_build-warnings.patch skksearch-0.0/debian/patches/050_build-warnings.patch
--- skksearch-0.0/debian/patches/050_build-warnings.patch	1970-01-01 09:00:00.000000000 +0900
+++ skksearch-0.0/debian/patches/050_build-warnings.patch	2012-07-08 13:24:27.000000000 +0900
@@ -0,0 +1,49 @@
+Description: Clean build errors and warnings from gcc 4.1.1
+Author: Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>
+
+Index: skksearch-0.0/main.c
+===================================================================
+--- skksearch-0.0.orig/main.c	2007-04-23 21:41:05.000000000 +0900
++++ skksearch-0.0/main.c	2007-04-23 21:41:05.000000000 +0900
+@@ -15,6 +15,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ 
+ #include "config.h"
+ 
+@@ -60,11 +61,10 @@
+ void searchdicts();
+ 
+ 
+-main(int argc, char *argv[]) {
++int main(int argc, char *argv[]) {
+   int c;
+   int s;
+   int i;
+-  char *p;
+   int errflag = 0;
+   int terminal = 0;
+   char *conf = NULL;
+Index: skksearch-0.0/dic_cdb.c
+===================================================================
+--- skksearch-0.0.orig/dic_cdb.c	2007-04-23 21:40:22.000000000 +0900
++++ skksearch-0.0/dic_cdb.c	2007-04-23 21:48:04.000000000 +0900
+@@ -15,6 +15,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <string.h>
+@@ -42,7 +43,7 @@
+ }
+ 
+ char *dic_cdb_search(struct dic *d, char *key, int keylen) {
+-  int dlen;
++  unsigned int dlen;
+   int fd = ((struct dic_cdb_internal *)(d->internal))->fd;
+   char *buf = d->buf;
+ 
diff -Nru skksearch-0.0/debian/patches/clean-build-errors-and-warnings.diff skksearch-0.0/debian/patches/clean-build-errors-and-warnings.diff
--- skksearch-0.0/debian/patches/clean-build-errors-and-warnings.diff	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/patches/clean-build-errors-and-warnings.diff	1970-01-01 09:00:00.000000000 +0900
@@ -1,50 +0,0 @@
-clean-build-errors-and-warnings.diff by Noritada Kobayashi
-<nori1@dolphin.c.u-tokyo.ac.jp>
-
-Clean build errors and warnings from gcc.
-Index: skksearch-0.0/main.c
-===================================================================
---- skksearch-0.0.orig/main.c	2007-04-23 21:41:05.000000000 +0900
-+++ skksearch-0.0/main.c	2007-04-23 21:41:05.000000000 +0900
-@@ -15,6 +15,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <unistd.h>
- 
- #include "config.h"
- 
-@@ -60,11 +61,10 @@
- void searchdicts();
- 
- 
--main(int argc, char *argv[]) {
-+int main(int argc, char *argv[]) {
-   int c;
-   int s;
-   int i;
--  char *p;
-   int errflag = 0;
-   int terminal = 0;
-   char *conf = NULL;
-Index: skksearch-0.0/dic_cdb.c
-===================================================================
---- skksearch-0.0.orig/dic_cdb.c	2007-04-23 21:40:22.000000000 +0900
-+++ skksearch-0.0/dic_cdb.c	2007-04-23 21:48:04.000000000 +0900
-@@ -15,6 +15,7 @@
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <unistd.h>
- #include <fcntl.h>
- #include <errno.h>
- #include <string.h>
-@@ -42,7 +43,7 @@
- }
- 
- char *dic_cdb_search(struct dic *d, char *key, int keylen) {
--  int dlen;
-+  unsigned int dlen;
-   int fd = ((struct dic_cdb_internal *)(d->internal))->fd;
-   char *buf = d->buf;
- 
diff -Nru skksearch-0.0/debian/patches/conf-file.diff skksearch-0.0/debian/patches/conf-file.diff
--- skksearch-0.0/debian/patches/conf-file.diff	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/patches/conf-file.diff	1970-01-01 09:00:00.000000000 +0900
@@ -1,73 +0,0 @@
-conf-file.diff by Takao KAWAMURA <kawamura@debian.org>
-
-Add support for a configuration file.
-Index: skksearch-0.0/main.c
-===================================================================
---- skksearch-0.0.orig/main.c	Fri Dec  8 11:03:41 2000
-+++ skksearch-0.0/main.c	Fri Dec  8 11:04:31 2000
-@@ -67,11 +67,12 @@
-   char *p;
-   int errflag = 0;
-   int terminal = 0;
-+  char *conf = NULL;
-   extern char *optarg;
-   extern int optind;
- 
-   /* process arguments */
--  while ((c = getopt(argc, argv, "l:f:sit")) != EOF) {
-+  while ((c = getopt(argc, argv, "l:f:sic:t")) != EOF) {
-    switch (c) {
-     case 'l':
-       loglevel = atoi(optarg);
-@@ -84,13 +85,16 @@
-       break;
-     case 't':
-       terminal = 1;
-+    case 'c':
-+      conf = optarg;
-+      break;
-     case '?':
-       errflag = 1;
-     }
-   }
-   if (errflag) {
-     fprintf(stderr,
--	    "usage: %s [-l digit] [-f logfile] [-s] dictinary1 ... \n",
-+	    "usage: %s [-l digit] [-f logfile] [-s] [-c config] [dictinary1 ...] \n",
- 	    argv[0]);
-     exit(1);
-   }
-@@ -107,6 +111,33 @@
-   for (i = 0; i < dicnum; i++) {
-     err(LOG_DEBUG, "openning dictionary %s", argv[optind + i]);
-     diclist[i] = dic_open(argv[optind + i]);
-+  }
-+  if (conf != NULL) {
-+     FILE *fp;
-+     char line[1024];
-+     char *p;
-+     fp = fopen(conf, "r");
-+     if (fp == NULL) {
-+	err(LOG_ERR, "cannot open config file `%s'\n", conf);
-+	exit(1);
-+     }
-+     while ((p = fgets(line, sizeof(line), fp)) != NULL) {
-+	if (p[0] == '#' || p[0] == '\n') 
-+	    continue;
-+	p[strlen(p)-1] = '\0'; /* chop */
-+	if (i >= MAXDICNUM) {
-+	    err(LOG_ERR, "too many dicts in config file\n");
-+	    exit(1);
-+	}
-+	err(LOG_DEBUG, "openning dictionary %s", p);
-+	dicnum++;
-+	diclist[i++] = dic_open(p);
-+     }
-+     fclose(fp);
-+  }
-+  if (dicnum == 0) {
-+     err(LOG_ERR, "no dict specified\n");
-+     exit(1);
-   }
- 
-   /* main loop */
diff -Nru skksearch-0.0/debian/patches/db4.3.diff skksearch-0.0/debian/patches/db4.3.diff
--- skksearch-0.0/debian/patches/db4.3.diff	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/patches/db4.3.diff	1970-01-01 09:00:00.000000000 +0900
@@ -1,95 +0,0 @@
-db4.3.dpatch by Matej Vela <vela@debian.org>
-
-Port to Berkeley DB 4.3-4.6.
-Index: skksearch-0.0/dic_db.c
-===================================================================
---- skksearch-0.0.orig/dic_db.c	2005-11-12 19:49:38.000000000 +0100
-+++ skksearch-0.0/dic_db.c	2005-11-12 19:55:03.000000000 +0100
-@@ -23,19 +23,21 @@
- 
- /* BerkeleyDB environment */
- int env_initialized = 0;
--DB_ENV env;
--void errcall(const char *, char *);
-+DB_ENV *env;
-+void errcall(const DB_ENV *, const char *, const char *);
- 
- 
- struct dic *dic_db_open(struct dic *d, char *path) {
-+  int ret;
-   struct dic_db_internal *internal;
- 
-   if (!env_initialized) {
--    env.db_errcall = errcall;
--    if ((errno = db_appinit(NULL, NULL, &env, DB_USE_ENVIRON)) != 0) {
--      err(LOG_ERR, "dic_db_open: db_appinit failed\n");
-+    if ((ret = db_env_create(&env, 0)) != 0
-+	|| (ret = env->open(env, NULL, 0, DB_USE_ENVIRON)) != 0) {
-+      err(LOG_ERR, "dic_db_open: %s\n", db_strerror(ret));
-       exit(1);
-     }
-+    env->set_errcall(env, errcall);
-     env_initialized = 1;
-   }
- 
-@@ -45,10 +47,10 @@
-   }
-   memset(internal, 0, sizeof(struct dic_db_internal));
- 
--  if ((errno =
--       db_open(path, DB_UNKNOWN, DB_RDONLY, 0, &env, NULL, &(internal->db)))
--      != 0) {
--    err(LOG_ERR, "dic_db_open(%s): %s\n", path, strerror(errno));
-+  if ((ret = db_create(&(internal->db), env, 0)) != 0
-+      || (ret = internal->db->open(internal->db, NULL, path, NULL,
-+				   DB_UNKNOWN, DB_RDONLY, 0)) != 0) {
-+    err(LOG_ERR, "dic_db_open(%s): %s\n", path, db_strerror(ret));
-     exit(1);
-   }
-   d->internal = (void *)internal;
-@@ -58,6 +60,7 @@
-   }
- 
- char *dic_db_search(struct dic *d, char *keystr, int keylen) {
-+  int ret;
-   struct dic_db_internal *internal = (struct dic_db_internal *)(d->internal);
-   DB *db = internal->db;
-   DBT key;
-@@ -71,23 +74,24 @@
-   data.ulen = DIC_BUFSIZE - 1;	/* -1 for '\0' */
-   data.flags = DB_DBT_USERMEM;
- 
--  if ((errno = db->get(db, NULL, &key, &data, 0)) == DB_NOTFOUND) {
-+  if ((ret = db->get(db, NULL, &key, &data, 0)) == DB_NOTFOUND) {
-     return NULL;
--  } else if (errno == 0) {	/* found */
-+  } else if (ret == 0) {	/* found */
-     *((char *)(data.data) + data.size) = '\0';
-     return (char *)(data.data);
-   } else {
-     err(LOG_WARNING, "dic_db_search: %s (may be too long entry)\n",
--	strerror(errno));
-+	db_strerror(ret));
-     return NULL;
-   }
- }
- 
- 
- int dic_db_close(struct dic *d) {
-+  int ret;
-   DB *db = ((struct dic_db_internal *)(d->internal))->db;
--  if ((errno = db->close(db, 0)) != 0) {
--    err(LOG_ERR, "dic_db_close: %s\n", strerror(errno));
-+  if ((ret = db->close(db, 0)) != 0) {
-+    err(LOG_ERR, "dic_db_close: %s\n", db_strerror(ret));
-     exit(1);
-   }
-   free(d->internal);
-@@ -96,6 +100,6 @@
- }
- 
- 
--void errcall(const char *foo, char *message) {
-+void errcall(const DB_ENV *dbenv, const char *foo, const char *message) {
-   err(LOG_ERR, "dic_db: %s\n", message);
- }
diff -Nru skksearch-0.0/debian/patches/dic-bufsize.diff skksearch-0.0/debian/patches/dic-bufsize.diff
--- skksearch-0.0/debian/patches/dic-bufsize.diff	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/patches/dic-bufsize.diff	1970-01-01 09:00:00.000000000 +0900
@@ -1,16 +0,0 @@
-dic-bufsize.dpatch by SATOH Fumiyasu <fumiya@samba.gr.jp>
-
-Increase DIC_BUFSIZE (Debian bug#376855).
-Index: skksearch-0.0/dic.h
-===================================================================
---- skksearch-0.0.orig/dic.h
-+++ skksearch-0.0/dic.h
-@@ -12,7 +12,7 @@
-  * GNU General Public License for more details.
-  */
- 
--#define DIC_BUFSIZE 1024
-+#define DIC_BUFSIZE 4096
- 
- struct dic {
-   char buf[DIC_BUFSIZE];
diff -Nru skksearch-0.0/debian/patches/plain-search.diff skksearch-0.0/debian/patches/plain-search.diff
--- skksearch-0.0/debian/patches/plain-search.diff	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/patches/plain-search.diff	1970-01-01 09:00:00.000000000 +0900
@@ -1,67 +0,0 @@
-plain-search.dpatch by KIHARA Hideto <deton@m1.interq.or.jp>
-
-Fix end condition in binary search algorithm for plain dictionaries (#209217).
-
-Received: from [146.82.138.7] (helo=master.debian.org) by nu.ike.tottori-u.ac.jp with esmtp (Exim 3.36 #1 (Debian)) for ml@kawamura.net id 19ut2u-0001MC-00; Thu, 04 Sep 2003 21:17:04 +0900
-Received: from a15-c1.data-hotel.net [203.174.65.19]  by master.debian.org with smtp (Exim 3.35 1 (Debian)) id 19ut2q-0000vR-00; Thu, 04 Sep 2003 07:17:00 -0500
-Received: (qmail 71944 invoked by alias); 4 Sep 2003 21:16:44 +0900
-Mailing-List: contact skk-help@ring.gr.jp; run by ezmlm
-Precedence: bulk
-X-No-Archive: yes
-List-Post: <mailto:skk@ring.gr.jp>
-Reply-To: skk@ring.gr.jp
-List-Help: <mailto:skk-help@ring.gr.jp>
-List-Unsubscribe: <mailto:skk-unsubscribe@ring.gr.jp>
-List-Subscribe: <mailto:skk-subscribe@ring.gr.jp>
-Delivered-To: mailing list skk@ring.gr.jp
-Received: (qmail 71354 invoked from network); 4 Sep 2003 21:15:58 +0900
-Date: Thu, 4 Sep 2003 21:16:41 +0900
-From: KIHARA Hideto <deton@m1.interq.or.jp>
-To: skk@ring.gr.jp
-Message-ID: <20030904121641.GA2684@m1.interq.or.jp>
-Mime-Version: 1.0
-User-Agent: Mutt/1.4.1i-ja.1
-Subject: [skk 5028] patch for skksearch
-X-Bogosity: No, tests=bogofilter, spamicity=0.000004, version=0.14.4
-X-UIDL: ''7"!Le8!!?#@!!?06"!
-Content-Type: text/plain; charset="ISO-2022-JP"
-Content-Transfer-Encoding: 7bit
-
-skksearch-0.0用のパッチです。
-配布元のページはもう無くなってしまったようですが、
-Debianのパッケージに入っていて、
-はまってる人をたまに見かけるので、SKK MLにも流しておきます。
-# 2ちゃんねるの方には2月ごろに流したんですが。
-
-* 現象
-「あg」のような読みを検索するとskksearchが暴走してCPUを食いつぶす。
-
-* 発生条件
-okuri-ari entriesが空のplain辞書(SKK-JISYO.JIS2等)が
-検索対象辞書に含まれるときに、
-「あg」のようにokuri-nasi entriesよりも辞書順で小さい読みを検索すると、
-無限ループにはまる。
-
-CDB形式の辞書の場合は発生しない。
-
-* 原因
-okuri-ari entriesが空の場合に、ファイル中の位置が
-okuri-ari entriesの終了位置より後になるが、
-==で比較しているためループを抜けない。
-
-* パッチ
-==を>=に変更。
-
-Index: skksearch-0.0/dic_plain.c
-===================================================================
---- skksearch-0.0.orig/dic_plain.c	Fri Dec 15 18:06:06 2000
-+++ skksearch-0.0/dic_plain.c	Sat Feb 22 23:04:10 2003
-@@ -118,7 +118,7 @@
-   while (1) {
-     fseek(fp, (end + begin) / 2, SEEK_SET); /* center */
-     fgets(buf, DIC_BUFSIZE, fp); /* Skip */
--    if ((half = ftell(fp)) == end) {
-+    if ((half = ftell(fp)) >= end) {
-       break;			/* goto linear search */
-     }
-     fgets(buf, DIC_BUFSIZE, fp);
diff -Nru skksearch-0.0/debian/patches/series skksearch-0.0/debian/patches/series
--- skksearch-0.0/debian/patches/series	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/patches/series	2012-07-08 13:24:27.000000000 +0900
@@ -1,5 +1,5 @@
-conf-file.diff
-db4.3.diff
-dic-bufsize.diff
-plain-search.diff
-clean-build-errors-and-warnings.diff
+010_conf-file.patch
+020_plain-search.patch
+030_db4.3.patch
+040_dic-bufsize.patch
+050_build-warnings.patch
diff -Nru skksearch-0.0/debian/rules skksearch-0.0/debian/rules
--- skksearch-0.0/debian/rules	2011-05-03 23:35:48.000000000 +0900
+++ skksearch-0.0/debian/rules	2012-07-08 13:08:04.000000000 +0900
@@ -6,8 +6,13 @@
 DEB_INSTALL_DOCS_ALL :=
 DEB_INSTALL_MANPAGES_skksearch := debian/skksearch.8
 
-CFLAGS := -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
-DEB_MAKE_BUILD_TARGET := CFLAGS='$(CFLAGS) -DSYSLOG' LDFLAGS='-lcdb -ldb'
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags
+CFLAGS=$(shell $(dpkg_buildflags) --get CFLAGS)
+CPPFLAGS=$(shell $(dpkg_buildflags) --get CPPFLAGS)
+LDFLAGS=$(shell $(dpkg_buildflags) --get LDFLAGS)
+
+DEB_MAKE_BUILD_TARGET := CFLAGS='$(CFLAGS) $(CPPFLAGS) -DSYSLOG' LDFLAGS='$(LDFLAGS) -lcdb -ldb'
 DEB_MAKE_INSTALL_TARGET :=
 DEB_MAKE_CHECK_TARGET :=
 

Attachment: pgpcDwjp2ohLf.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
On Sat, Sep  1, 2012 at 21:21:12 +0900, Tatsuya Kinoshita wrote:

> tags 682087 - moreinfo
> retitle 682087 unblock: skksearch/0.0-21
> thanks
> 
> Please unblock skksearch/0.0-21 to enable hardening flags for wheezy.
> 
I think this might just as well have waited for wheezy+1, but oh well.
Unblocked.

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: