From a7593ff515bf859326cecc84bf2406c065bac468 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Thu, 25 Apr 2024 19:12:39 +0200 Subject: [PATCH] fix: sqlite mysql auth patch --- deps/Makefile | 9 ++++----- deps/sqlite3/sqlite3_pass_exts.patch | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 97be1744f4..24501d5331 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -239,17 +239,16 @@ endif mariadb_client: mariadb-client-library/mariadb_client/libmariadb/libmariadbclient.a -sqlite3/sqlite3/sqlite3.o: +sqlite3/sqlite3/libsqlite3.so: cd sqlite3 && rm -rf sqlite-amalgamation-*/ || true cd sqlite3 && tar -zxf sqlite-amalgamation-*.tar.gz cd sqlite3/sqlite3 && patch -p1 < ../from_unixtime.patch cd sqlite3/sqlite3 && patch sqlite3.c < ../sqlite3.c-multiplication-overflow.patch -# FIX ME -# cd sqlite3/sqlite3 && patch -p0 < ../sqlite3_pass_exts.patch + cd sqlite3/sqlite3 && patch -p0 < ../sqlite3_pass_exts.patch cd sqlite3/sqlite3 && ${CC} ${MYCFLAGS} -fPIC -c -o sqlite3.o sqlite3.c -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_JSON1 -DSQLITE_DLL=1 - cd sqlite3/sqlite3 && ${CC} -shared -o libsqlite3.so sqlite3.o + cd sqlite3/sqlite3 && ${CC} -shared -Wl,-U,_ERR_error_string -Wl,-U,_RAND_bytes -Wl,-U,_SHA1 -Wl,-U,_sha256_crypt_r -Wl,-U,_ERR_get_error -o libsqlite3.so sqlite3.o -sqlite3: sqlite3/sqlite3/sqlite3.o +sqlite3: sqlite3/sqlite3/libsqlite3.so libconfig/libconfig/lib/.libs/libconfig++.a: diff --git a/deps/sqlite3/sqlite3_pass_exts.patch b/deps/sqlite3/sqlite3_pass_exts.patch index 467a363616..12a9853c5a 100644 --- a/deps/sqlite3/sqlite3_pass_exts.patch +++ b/deps/sqlite3/sqlite3_pass_exts.patch @@ -3,7 +3,7 @@ @@ -25168,6 +25168,183 @@ sqlite3ResultStrAccum(context, &sRes); } - + +#define DEF_SALT_SIZE 20 +#define SHA_DIGEST_LENGTH 20 + @@ -11,7 +11,7 @@ +//////////////////////////////////////////////////////////////////////////////// + +// ctype.h -+extern int toupper (int __c) __THROW; ++extern int toupper (int __c); + +// SHA256_crypt +char * sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen);