From 5cf3453b219adad1f98e8a6c461894d6cde4d28c5981b31958e936dbf65418cb Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 19 Aug 2021 07:58:41 +0000 Subject: [PATCH] Accepting request 913019 from home:WernerFink:Factory - Extend patch pam_dbus-0.2.1.3.dif to silent the module usage OBS-URL: https://build.opensuse.org/request/show/913019 OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam_dbus?expand=0&rev=10 --- pam_dbus-0.2.1.3.dif | 44 +++++++++++++++++++++++++++++++++++++++++++- pam_dbus.changes | 5 +++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/pam_dbus-0.2.1.3.dif b/pam_dbus-0.2.1.3.dif index 24cd7f2..0858a1c 100644 --- a/pam_dbus-0.2.1.3.dif +++ b/pam_dbus-0.2.1.3.dif @@ -1,6 +1,7 @@ --- data/pam_dbus.conf | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + src/pam_dbus.c | 20 ++++++++++++++++++++ + 2 files changed, 21 insertions(+), 2 deletions(-) --- data/pam_dbus.conf +++ data/pam_dbus.conf 2017-07-11 08:43:18.343905071 +0000 @@ -14,3 +15,44 @@ +--- src/pam_dbus.c ++++ src/pam_dbus.c 2021-08-19 07:33:23.113478347 +0000 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + PAM_EXTERN int pam_sm_authenticate(pam_handle_t *ph, int flags, int argc, const char **argv) { + DBusGConnection *connection; +@@ -32,7 +33,9 @@ PAM_EXTERN int pam_sm_authenticate(pam_h + + gboolean login_ok; + ++#if !GLIB_CHECK_VERSION (2,35,0) + g_type_init (); ++#endif + + error = NULL; + connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); +@@ -78,3 +81,20 @@ PAM_EXTERN int pam_sm_authenticate(pam_h + + return login_ok ? PAM_SUCCESS : PAM_AUTH_ERR; + } ++ ++/* logging function ripped from pam_listfile.c */ ++static void _pam_log(int err, const char *format, ...) { ++ va_list args; ++ ++ va_start(args, format); ++ openlog("pam_dbus", LOG_CONS|LOG_PID, LOG_AUTH); ++ vsyslog(err, format, args); ++ va_end(args); ++ closelog(); ++} ++ ++PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const ++ char **argv) { ++ _pam_log(LOG_ERR, "not a credentialator"); ++ return PAM_IGNORE; ++} diff --git a/pam_dbus.changes b/pam_dbus.changes index ce4cdff..224d7d0 100644 --- a/pam_dbus.changes +++ b/pam_dbus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 19 07:35:01 UTC 2021 - Dr. Werner Fink + +- Extend patch pam_dbus-0.2.1.3.dif to silent the module usage + ------------------------------------------------------------------- Mon Jul 27 10:26:52 UTC 2020 - Dr. Werner Fink