SHA256
1
0
forked from pool/pam_dbus
Dr. Werner Fink 2021-08-19 08:08:00 +00:00 committed by Git OBS Bridge
parent 5cf3453b21
commit 90979905e3
2 changed files with 8 additions and 18 deletions

View File

@ -1,7 +1,7 @@
--- ---
data/pam_dbus.conf | 3 +-- data/pam_dbus.conf | 3 +--
src/pam_dbus.c | 20 ++++++++++++++++++++ src/pam_dbus.c | 8 ++++++++
2 files changed, 21 insertions(+), 2 deletions(-) 2 files changed, 9 insertions(+), 2 deletions(-)
--- data/pam_dbus.conf --- data/pam_dbus.conf
+++ data/pam_dbus.conf 2017-07-11 08:43:18.343905071 +0000 +++ data/pam_dbus.conf 2017-07-11 08:43:18.343905071 +0000
@ -35,24 +35,12 @@
error = NULL; error = NULL;
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -78,3 +81,20 @@ PAM_EXTERN int pam_sm_authenticate(pam_h @@ -78,3 +81,8 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
return login_ok ? PAM_SUCCESS : PAM_AUTH_ERR; 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 +PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const
+ char **argv) { + char **argv) {
+ _pam_log(LOG_ERR, "not a credentialator");
+ return PAM_IGNORE; + return PAM_IGNORE;
+} +}

View File

@ -1,6 +1,7 @@
# #
# spec file for package pam_dbus # spec file for package pam_dbus
# #
# Copyright (c) 2021 SUSE LLC
# Copyright (c) specCURRENT_YEAR SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) specCURRENT_YEAR SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -12,16 +13,17 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%define commit 1d32154 %define commit 1d32154
Name: pam_dbus Name: pam_dbus
Version: 0.2.1.3 Version: 0.2.1.3
Release: 0 Release: 0
License: GPL-2.0+ License: GPL-2.0-or-later
Summary: PAM module asking the logged in user for confirmation Summary: PAM module asking the logged in user for confirmation
Url: http://git.nomeata.de/?p=darcs-mirror-pam-dbus.debian.git;a=summary URL: http://git.nomeata.de/?p=darcs-mirror-pam-dbus.debian.git;a=summary
Group: Productivity/Networking Group: Productivity/Networking
Source0: http://git.nomeata.de/?p=darcs-mirror-pam-dbus.debian.git;a=snapshot;h=1d32154;sf=tgz#/%{name}-%{version}.tar.gz Source0: http://git.nomeata.de/?p=darcs-mirror-pam-dbus.debian.git;a=snapshot;h=1d32154;sf=tgz#/%{name}-%{version}.tar.gz
Source1: pam_dbus.8 Source1: pam_dbus.8