summaryrefslogtreecommitdiff
path: root/dev-db/unixODBC
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-02 15:59:12 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-02 15:59:12 +0000
commit06a7b5647e11a8ddf69b1c3d3ded6a8ba28b923e (patch)
tree8d58c1f4b049da677b33209b072f2b3057268fe0 /dev-db/unixODBC
parent99abbc5e5a6ecd3fc981b45646fd8cb5d320377b (diff)
gentoo resync : 02.03.2018
Diffstat (limited to 'dev-db/unixODBC')
-rw-r--r--dev-db/unixODBC/Manifest4
-rw-r--r--dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch135
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild65
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.5.ebuild2
4 files changed, 204 insertions, 2 deletions
diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest
index 568a7bb00895..e601f74a8856 100644
--- a/dev-db/unixODBC/Manifest
+++ b/dev-db/unixODBC/Manifest
@@ -1,5 +1,7 @@
+AUX unixODBC-2.3.5-CVE-2018-7485.patch 5224 BLAKE2B a21d659f75f9ae11a6d78a4a74b0591786800e14f22d7fb4c7ef5005e0630b95453a319d9254bf3f5e423e74ae36c6a7bd097f3193869757b2bea34f8974e358 SHA512 a4d5dfafe75ea0e85feed76cf18474a89fcf6719ee58d0b56d57959526db2511df2df691bf9af2e1a34c716d2d90f6d274b48a11cfb7add74df799d1f1f67387
DIST unixODBC-2.3.4.tar.gz 1830660 BLAKE2B 19b3b932e66ab2fea5645d9723592d881d86203fcc93a1a34bdc9d24fbb7fa606a0389b37988606ac60da71f378327380a32d4687dba16e784c9cdf0fd9b5fdb SHA512 34799777c95539905d4bbe60ad2b83631a31a68483b6be96dba25f80fa2fff4624ba170078097c942f2206873776d179d7d02a340598c4627f8723eb6f083a26
DIST unixODBC-2.3.5.tar.gz 1633390 BLAKE2B f7c70740471b0c6ff298f2377a3895efbf160764adc4f607dfb65de2873ea3a39a2852399feaca50fc389875e20a10b3cd0389ba9e9f02d0548312d8063f5af5 SHA512 94b5ebb887571f4fa801ae4305cd6cb4eb0d03682fac1eb0422cdd13b046b077e60bff8286c578b0b5e291cfbc0bc8695495e39c3713858d2eeb7b38459397d5
EBUILD unixODBC-2.3.4-r1.ebuild 1664 BLAKE2B eaccced362a7f62eebe1809ee0327df36978a6f0856c2b631cee32763f92b20909c4bb32bc79bd179f5d9193f34d5307519bb1880d9a94bd5a27d238a3682efe SHA512 5429a6f9ad0279d77a2a26b5a1a0752a23646922fb0f2c2a3df594e551a1e46db614bb991d126d7652f5359e4ccbca0bfe1051c1af6b80ea47dbc59ca35d7329
-EBUILD unixODBC-2.3.5.ebuild 1773 BLAKE2B db134377e56f2fb30be44ffc5253bd2532825b9a73dd7a3be06ae706f339a6734a39398776f3616249146abf15eb9275f8065500cf2f14c2ca0e72a8b485ad98 SHA512 ebe2585e62f101da036faf9b1f6036e878cf06fc22112ef1b41e286fdef690edb00b5a9579003143a54b1466102421317fd47abde3b6cbfceabb383817ae18cd
+EBUILD unixODBC-2.3.5-r1.ebuild 1831 BLAKE2B c997d10b72858a9f15a37fa03d93788d24c6eb7b1234eb5f8cbb86124656e979fc29f8661c5fd72ad6cec3027389a7dbca766aeb73c400d4a97a440542ab3351 SHA512 70774fb70a84c4fa3c47df1a46336dba76979eebbe3c516c856629c0ce10bea54d141a90dcda73c163ba4fad050241f6c30f459b63ac40157135b7de3bcb1ad9
+EBUILD unixODBC-2.3.5.ebuild 1770 BLAKE2B a2cbcd5f110ac341228fe52330a03a2974dcef1e926e1d117971dbc3de71e8720511ae1474b80d9acc20c8af3ef3cb3ba56b930466da906483b29286e3fe1fb7 SHA512 e3e7b84a4c432a53c467c85828e5652e3475fa881db70c754c6b5b2884e39c89995fac9f1c9f6c151057c87c63f19c4d92a41d0d2097b464190209b19a4622c1
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/unixODBC-2.3.5-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
new file mode 100644
index 000000000000..6bc81e8881b8
--- /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.5.ebuild b/dev-db/unixODBC/unixODBC-2.3.5.ebuild
index eb5e0216e655..de06a4496d0c 100644
--- a/dev-db/unixODBC/unixODBC-2.3.5.ebuild
+++ b/dev-db/unixODBC/unixODBC-2.3.5.ebuild
@@ -10,7 +10,7 @@ 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"
+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="