Skip to content

Commit

Permalink
fix: sqlite mysql auth patch
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Apr 25, 2024
1 parent 7b908bb commit a7593ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions deps/sqlite3/sqlite3_pass_exts.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
@@ -25168,6 +25168,183 @@
sqlite3ResultStrAccum(context, &sRes);
}

+#define DEF_SALT_SIZE 20
+#define SHA_DIGEST_LENGTH 20
+
+/// Forward declarations
+////////////////////////////////////////////////////////////////////////////////
+
+// 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);
Expand Down

0 comments on commit a7593ff

Please sign in to comment.