!55 Fix loading external modules

From: @xuiny 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-01-06 07:48:58 +00:00 committed by Gitee
commit f6a6acda1e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From eeaacececf6ebbc3437594ee883bfc459a735a4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
<zboszor@gmail.com>
Date: Fri, 14 Oct 2022 13:12:11 +0200
Subject: [PATCH 14/14] Fix loading external modules
The module function pointer for discover_users() was not
detected and was left as NULL.
---
src/main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
index f2328da..44feb6f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -64,14 +64,17 @@ load_storage_module (const char *module_name)
if (module == NULL)
return FALSE;
+ g_debug ("About to load module '%s'", filename);
if (!g_module_symbol (module, "init", (gpointer *) &store.init) ||
!g_module_symbol (module, "deinit", (gpointer *) &store.deinit) ||
!g_module_symbol (module, "print_data_save", (gpointer *) &store.print_data_save) ||
!g_module_symbol (module, "print_data_load", (gpointer *) &store.print_data_load) ||
!g_module_symbol (module, "print_data_delete", (gpointer *) &store.print_data_delete) ||
- !g_module_symbol (module, "discover_prints", (gpointer *) &store.discover_prints))
+ !g_module_symbol (module, "discover_prints", (gpointer *) &store.discover_prints) ||
+ !g_module_symbol (module, "discover_users", (gpointer *) &store.discover_users))
{
g_module_close (module);
+ g_debug ("Failed to load module. Please update your code.");
return FALSE;
}
--
2.37.1.windows.1

View File

@ -1,6 +1,6 @@
Name: fprintd Name: fprintd
Version: 1.94.2 Version: 1.94.2
Release: 14 Release: 15
Summary: D-Bus service for Fingerprint reader access Summary: D-Bus service for Fingerprint reader access
License: GPLv2+ License: GPLv2+
@ -20,6 +20,7 @@ Patch0010: 0010-Translated-using-Weblate-Thai.patch
Patch0011: 0011-Translated-using-Weblate-Georgian.patch Patch0011: 0011-Translated-using-Weblate-Georgian.patch
Patch0012: 0012-Translated-using-Weblate-Hungarian.patch Patch0012: 0012-Translated-using-Weblate-Hungarian.patch
Patch0013: 0013-Translated-using-Weblate-Croatian.patch Patch0013: 0013-Translated-using-Weblate-Croatian.patch
Patch0014: 0014-Fix-loading-external-modules.patch
BuildRequires: meson BuildRequires: meson
BuildRequires: gcc BuildRequires: gcc
@ -106,6 +107,9 @@ fi
%{_mandir}/man8/pam_fprintd.8.gz %{_mandir}/man8/pam_fprintd.8.gz
%changelog %changelog
* Fri Jan 06 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-15
- Fix loading external modules
* Fri Jan 06 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-14 * Fri Jan 06 2023 xuxinyu <xuxinyu@xfusion.com> - 1.94.2-14
- Translated using Weblate (Croatian) - Translated using Weblate (Croatian)