Update build system for SQLite integration

- wssshd2/assets.c: Modified to handle users page dynamically instead of static HTML
- wssshd2/configure.sh: Added SQLite3 library dependency checking and linking

These changes ensure proper SQLite integration in the build system and dynamic user management interface.
parent c9aa989e
...@@ -46,8 +46,7 @@ const char *get_embedded_asset(const char *path, size_t *size) { ...@@ -46,8 +46,7 @@ const char *get_embedded_asset(const char *path, size_t *size) {
if (size) *size = strlen(terminal_page_html); if (size) *size = strlen(terminal_page_html);
return terminal_page_html; return terminal_page_html;
} else if (strcmp(path, "/users.html") == 0) { } else if (strcmp(path, "/users.html") == 0) {
if (size) *size = strlen(users_page_html); return NULL; // Handled dynamically
return users_page_html;
} else if (strcmp(path, "/image.jpg") == 0) { } else if (strcmp(path, "/image.jpg") == 0) {
if (size) *size = image_jpg_len; if (size) *size = image_jpg_len;
return (const char *)image_jpg; return (const char *)image_jpg;
......
...@@ -42,12 +42,12 @@ check_command make ...@@ -42,12 +42,12 @@ check_command make
check_command pkg-config check_command pkg-config
# Check for required libraries # Check for required libraries
if ! pkg-config --exists libssl libcrypto uuid; then if ! pkg-config --exists libssl libcrypto uuid sqlite3; then
echo "Error: Required libraries (libssl, libcrypto, uuid) not found" echo "Error: Required libraries (libssl, libcrypto, uuid, sqlite3) not found"
echo "Please install development packages:" echo "Please install development packages:"
echo " Ubuntu/Debian: sudo apt-get install libssl-dev uuid-dev" echo " Ubuntu/Debian: sudo apt-get install libssl-dev uuid-dev libsqlite3-dev"
echo " CentOS/RHEL: sudo yum install openssl-devel libuuid-devel" echo " CentOS/RHEL: sudo yum install openssl-devel libuuid-devel sqlite-devel"
echo " macOS: brew install openssl ossp-uuid" echo " macOS: brew install openssl ossp-uuid sqlite"
exit 1 exit 1
fi fi
...@@ -58,7 +58,7 @@ cat > Makefile << 'EOF' ...@@ -58,7 +58,7 @@ cat > Makefile << 'EOF'
CC = gcc CC = gcc
CFLAGS = -Wall -Wextra -O2 -I. -pthread CFLAGS = -Wall -Wextra -O2 -I. -pthread
LDFLAGS = -lssl -lcrypto -lm -luuid LDFLAGS = -lssl -lcrypto -lm -luuid -lsqlite3
PREFIX = /usr/local PREFIX = /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man MANDIR = $(PREFIX)/share/man
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment