summaryrefslogtreecommitdiff
path: root/dev-db/unixODBC
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-db/unixODBC
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db/unixODBC')
-rw-r--r--dev-db/unixODBC/Manifest6
-rw-r--r--dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch135
-rw-r--r--dev-db/unixODBC/metadata.xml8
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild65
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.6.ebuild61
5 files changed, 275 insertions, 0 deletions
diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest
new file mode 100644
index 000000000000..29fde14cffc0
--- /dev/null
+++ b/dev-db/unixODBC/Manifest
@@ -0,0 +1,6 @@
+AUX unixODBC-2.3.5-CVE-2018-7485.patch 5224 BLAKE2B a21d659f75f9ae11a6d78a4a74b0591786800e14f22d7fb4c7ef5005e0630b95453a319d9254bf3f5e423e74ae36c6a7bd097f3193869757b2bea34f8974e358 SHA512 a4d5dfafe75ea0e85feed76cf18474a89fcf6719ee58d0b56d57959526db2511df2df691bf9af2e1a34c716d2d90f6d274b48a11cfb7add74df799d1f1f67387
+DIST unixODBC-2.3.5.tar.gz 1633390 BLAKE2B f7c70740471b0c6ff298f2377a3895efbf160764adc4f607dfb65de2873ea3a39a2852399feaca50fc389875e20a10b3cd0389ba9e9f02d0548312d8063f5af5 SHA512 94b5ebb887571f4fa801ae4305cd6cb4eb0d03682fac1eb0422cdd13b046b077e60bff8286c578b0b5e291cfbc0bc8695495e39c3713858d2eeb7b38459397d5
+DIST unixODBC-2.3.6.tar.gz 1661914 BLAKE2B 75162344e2b2713ae056dae0a2c1be31994ef350b4aa3ee7ae924b17527f35e0b7c9bb5a23763ab71553ef67a025d2a6549e564507b95991d6a193e165f1e774 SHA512 6518a4169946e847dd710d54724a44d268b98954d30064eadadb703edbbeafac05bd1f42a6845c2fdcdab7ae8987800acd1a5f6b4b96de5f3c8c3e4bc370fe30
+EBUILD unixODBC-2.3.5-r1.ebuild 1822 BLAKE2B d1a30ee371f5e71d3ed6e093a941783b2299497898ba3499792808914a65165f48e30a0562350cb427f2bdd5f1bd3a53c674449620e21ffcd3d8eb0486928698 SHA512 ce2d7fc36381d9c4cdda53198b4159332d257e9d63de7e16a51c7d8a1f9bf4932269813ad645985f3cc0f2df1ca5cebd3fa4e29484b07793106d220c02220279
+EBUILD unixODBC-2.3.6.ebuild 1785 BLAKE2B aa3ba92f38344e7a48517ecc302ea184dd9eb67831c19c34825266f7f75c71eec9c49b681d5278d72807a210d748764d260044f54f5e2ecea965729dfd387be2 SHA512 e4fd0ecdd6c81b331e4ff4f6a8e9aafb483712c8dab16c2334a04b29764eb500764c258969636696594db40af820b0421f91388c3627c7d7108e8a15169b6a3f
+MISC metadata.xml 366 BLAKE2B 9832224237ae18987939d9c0f657c6666114a5ce41af09a3a5a423d666ec70d9c5cd4fec1d82134b68e2e96b1a3e390977a0cd95001d325465d75b2b9b311d64 SHA512 e47157f178b585272b5c11682cef0c7b7dec227ded178d3427e91632f754db869deb72a6c1b258dfc90f6760028d3045d1e703874ae24111f8deb9db629b8c29
diff --git a/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch b/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch
new file mode 100644
index 000000000000..2c4178cda48f
--- /dev/null
+++ b/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch
@@ -0,0 +1,135 @@
+From 45ef78e037f578b15fc58938a3a3251655e71d6f Mon Sep 17 00:00:00 2001
+From: Nick Gorham <nick@lurcher.ink.org>
+Date: Mon, 8 Jan 2018 11:12:39 +0000
+Subject: [PATCH] New Pre Source
+
+diff --git a/DriverManager/SQLGetDiagRecW.c b/DriverManager/SQLGetDiagRecW.c
+index a6368d7..be89120 100644
+--- a/DriverManager/SQLGetDiagRecW.c
++++ b/DriverManager/SQLGetDiagRecW.c
+@@ -98,6 +98,8 @@
+
+ static char const rcsid[]= "$RCSfile: SQLGetDiagRecW.c,v $";
+
++extern int __is_env( EHEAD * head ); /* in SQLGetDiagRec.c */
++
+ static SQLRETURN extract_sql_error_rec_w( EHEAD *head,
+ SQLWCHAR *sqlstate,
+ SQLINTEGER rec_number,
+diff --git a/DriverManager/SQLSetDescField.c b/DriverManager/SQLSetDescField.c
+index 333d786..0e2f67c 100644
+--- a/DriverManager/SQLSetDescField.c
++++ b/DriverManager/SQLSetDescField.c
+@@ -306,7 +306,7 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
++ if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_07009, NULL,
+@@ -315,9 +315,9 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
+- && value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
+- value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
++ if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
++ && (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
++ (intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_HY105, NULL,
+diff --git a/DriverManager/SQLSetDescFieldW.c b/DriverManager/SQLSetDescFieldW.c
+index 5e066ac..45125ff 100644
+--- a/DriverManager/SQLSetDescFieldW.c
++++ b/DriverManager/SQLSetDescFieldW.c
+@@ -288,7 +288,7 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
++ if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_07009, NULL,
+@@ -297,9 +297,9 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
+- && value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
+- value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
++ if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
++ && (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
++ (intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_HY105, NULL,
+diff --git a/exe/iusql.c b/exe/iusql.c
+index aac5329..484a889 100644
+--- a/exe/iusql.c
++++ b/exe/iusql.c
+@@ -413,7 +413,6 @@ static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNa
+ if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt );
+ fprintf( stderr, "[ISQL]ERROR: Could not SQLExecDirect\n" );
+ SQLFreeStmt( hStmt, SQL_DROP );
+- free(szSepLine);
+ return 0;
+ }
+ }
+diff --git a/odbcinst/SQLCreateDataSource.c b/odbcinst/SQLCreateDataSource.c
+index a9fa735..83a1e9e 100644
+--- a/odbcinst/SQLCreateDataSource.c
++++ b/odbcinst/SQLCreateDataSource.c
+@@ -26,7 +26,7 @@ char* _multi_string_alloc_and_copy( LPCWSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
+@@ -55,7 +55,7 @@ char* _single_string_alloc_and_copy( LPCWSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 )
+@@ -83,7 +83,7 @@ SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
+@@ -112,7 +112,7 @@ SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 )
+diff --git a/odbcinst/SQLWriteFileDSN.c b/odbcinst/SQLWriteFileDSN.c
+index c2f987b..e225796 100644
+--- a/odbcinst/SQLWriteFileDSN.c
++++ b/odbcinst/SQLWriteFileDSN.c
+@@ -21,7 +21,7 @@ BOOL SQLWriteFileDSN( LPCSTR pszFileName,
+
+ if ( pszFileName[0] == '/' )
+ {
+- strncpy( szFileName, sizeof(szFileName) - 5, pszFileName );
++ strncpy( szFileName, pszFileName, sizeof(szFileName) - 5 );
+ }
+ else
+ {
diff --git a/dev-db/unixODBC/metadata.xml b/dev-db/unixODBC/metadata.xml
new file mode 100644
index 000000000000..4ebc84f52877
--- /dev/null
+++ b/dev-db/unixODBC/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="minimal">Disable bundled drivers and extra libraries (most users don't need these)</flag>
+ <flag name="odbcmanual">Administrator, Internal Structure, Programmer and User documentation</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
new file mode 100644
index 000000000000..89b4a5c3aa39
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit libtool ltprune multilib-minimal
+
+DESCRIPTION="A complete ODBC driver manager"
+HOMEPAGE="http://www.unixodbc.org/"
+SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+minimal odbcmanual static-libs unicode"
+
+RDEPEND="
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.5-CVE-2018-7485.patch"
+)
+
+multilib_src_configure() {
+ # --enable-driver-conf is --enable-driverc as per configure.in
+ myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/${PN}
+ --disable-static
+ --enable-iconv
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable !minimal drivers)
+ $(use_enable !minimal driverc)
+ $(use_with unicode iconv-char-enc UTF8)
+ $(use_with unicode iconv-ucode-enc UTF16LE)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use odbcmanual ; then
+ # We could simply run "make install-html" if we'd not had
+ # out-of-source builds here.
+ docinto html
+ dodoc -r doc/.
+ find "${ED%/}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
+ fi
+
+ use prefix && dodoc README*
+ prune_libtool_files
+}
diff --git a/dev-db/unixODBC/unixODBC-2.3.6.ebuild b/dev-db/unixODBC/unixODBC-2.3.6.ebuild
new file mode 100644
index 000000000000..50b7a38b6389
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit libtool multilib-minimal
+
+DESCRIPTION="A complete ODBC driver manager"
+HOMEPAGE="http://www.unixodbc.org/"
+SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+minimal odbcmanual static-libs unicode"
+
+RDEPEND="
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+
+multilib_src_configure() {
+ # --enable-driver-conf is --enable-driverc as per configure.in
+ myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/${PN}
+ --disable-static
+ --enable-iconv
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable !minimal drivers)
+ $(use_enable !minimal driverc)
+ $(use_with unicode iconv-char-enc UTF8)
+ $(use_with unicode iconv-ucode-enc UTF16LE)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use odbcmanual ; then
+ # We could simply run "make install-html" if we'd not had
+ # out-of-source builds here.
+ docinto html
+ dodoc -r doc/.
+ find "${ED%/}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
+ fi
+
+ use prefix && dodoc README*
+ find "${ED}" -name '*.la' -delete || die
+}