.gear/rules | 4 + .../tags/5f9d07cbbc77a2b8a17e96790355f0d2189000aa | 13 +++ .gear/tags/list | 1 + fprintd-0.4.1-alt-build.patch | 13 +++ fprintd-0.4.1-alt-pam_docs.patch | 14 +++ fprintd-0.4.1-debian-pam_args.patch | 82 +++++++++++++++++ fprintd.spec | 102 +++++++++++++++++++++ src/device.xml | 13 +++ system-auth-fprintd | 7 ++ 9 files changed, 249 insertions(+) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..32f50a7 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,4 @@ +copy: *.patch +copy: system-auth-fprintd +tar: v@version@:. +diff: v@version@:. . diff --git a/.gear/tags/5f9d07cbbc77a2b8a17e96790355f0d2189000aa b/.gear/tags/5f9d07cbbc77a2b8a17e96790355f0d2189000aa new file mode 100644 index 0000000..cc43a7a --- /dev/null +++ b/.gear/tags/5f9d07cbbc77a2b8a17e96790355f0d2189000aa @@ -0,0 +1,13 @@ +object 71bc81468f4024f03d84ab24e69de25c0567b5c7 +type commit +tag v0.4.1 +tagger Ivan Ovcherenko 1351256784 +0400 + +0.4.1 with updates +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iEYEABECAAYFAlCKitAACgkQws221KvgRhWXGwCeO/C8kQjHbUrd32jvP3Kb3AvW +ipgAoKfDVSfqr6S6Xpj7qLD77ds3D1w/ +=kKB4 +-----END PGP SIGNATURE----- diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..3af0c38 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +5f9d07cbbc77a2b8a17e96790355f0d2189000aa v0.4.1 diff --git a/fprintd-0.4.1-alt-build.patch b/fprintd-0.4.1-alt-build.patch new file mode 100644 index 0000000..3c0b797 --- /dev/null +++ b/fprintd-0.4.1-alt-build.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 67d3899..c2c08c1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4,8 +4,6 @@ EXTRA_DIST = TODO intltool-extract.in intltool-merge.in intltool-update.in + + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc + +-all: check create-pot +- + check: check-translations + + create-pot: diff --git a/fprintd-0.4.1-alt-pam_docs.patch b/fprintd-0.4.1-alt-pam_docs.patch new file mode 100644 index 0000000..8706717 --- /dev/null +++ b/fprintd-0.4.1-alt-pam_docs.patch @@ -0,0 +1,14 @@ +diff --git a/pam/README b/pam/README +index 9174deb..77603d4 100644 +--- a/pam/README ++++ b/pam/README +@@ -14,6 +14,9 @@ Options: + * You can add the "debug" option on the pam configuration file line above, + this will log more information from PAM to the file specified in your + syslog configuration (/var/log/secure by default on Fedora) ++* You can redefine number of maximum tries of finger enrollment and ++ authorization timeout in pam configuration file using next options: ++ "max_tries=" and "timeout=". Default is 3 and 30 respectively. + + Known issues: + * pam_fprintd does not support identifying the user itself as diff --git a/fprintd-0.4.1-debian-pam_args.patch b/fprintd-0.4.1-debian-pam_args.patch new file mode 100644 index 0000000..fea6c89 --- /dev/null +++ b/fprintd-0.4.1-debian-pam_args.patch @@ -0,0 +1,82 @@ +From 00a14d873ba92dfaf90fe82cd6d0c8f7e6cc0744 Mon Sep 17 00:00:00 2001 +From: Didier Raboud +Date: Mon, 14 May 2012 17:29:56 +0200 +Subject: [PATCH] pam: Make max_tries and timeout arguments. +Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=49918 + +--- + pam/pam_fprintd.c | 30 +++++++++++++++++++++++------- + 1 files changed, 23 insertions(+), 7 deletions(-) + +diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c +index 52fce32..1b38c2c 100644 +--- a/pam/pam_fprintd.c ++++ b/pam/pam_fprintd.c +@@ -39,8 +39,8 @@ + + #include "fingerprint-strings.h" + +-#define MAX_TRIES 3 +-#define TIMEOUT 30 ++#define DEFAULT_MAX_TRIES 3 ++#define DEFAULT_TIMEOUT 30 + + #define D(pamh, ...) { \ + if (debug) { \ +@@ -53,6 +53,8 @@ + + + static gboolean debug = FALSE; ++static guint max_tries = DEFAULT_MAX_TRIES; ++static guint timeout = DEFAULT_TIMEOUT; + + static gboolean send_info_msg(pam_handle_t *pamh, const char *msg) + { +@@ -271,7 +273,7 @@ static int do_verify(GMainLoop *loop, pam_handle_t *pamh, DBusGProxy *dev, gbool + int ret; + + data = g_new0 (verify_data, 1); +- data->max_tries = MAX_TRIES; ++ data->max_tries = max_tries; + data->pamh = pamh; + data->loop = loop; + +@@ -304,7 +306,7 @@ static int do_verify(GMainLoop *loop, pam_handle_t *pamh, DBusGProxy *dev, gbool + GSource *source; + + /* Set up the timeout on our non-default context */ +- source = g_timeout_source_new_seconds (TIMEOUT); ++ source = g_timeout_source_new_seconds (timeout); + g_source_attach (source, g_main_loop_get_context (loop)); + g_source_set_callback (source, verify_timeout_cb, data, NULL); + +@@ -429,9 +431,23 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, + return PAM_AUTHINFO_UNAVAIL; + + for (i = 0; i < argc; i++) { +- if (argv[i] != NULL && g_str_equal (argv[i], "debug")) { +- g_message ("debug on"); +- debug = TRUE; ++ if (argv[i] != NULL) { ++ if(g_str_equal (argv[i], "debug")) { ++ g_message ("debug on"); ++ debug = TRUE; ++ } ++ else if (strncmp(argv[i], "max_tries=", 10) == 0 && strlen(argv[i]) == 11){ ++ char max_tries_l[1]; ++ strncpy(max_tries_l,argv[i] + 10,1); ++ sscanf(max_tries_l,"%d", &max_tries); ++ D(pamh, "max_tries specified as: %d",max_tries); ++ } ++ else if (strncmp(argv[i], "timeout=", 8) == 0 && strlen(argv[i]) <= 10){ ++ char timeout_l[2]; ++ strncpy(timeout_l,argv[i] + 8,strlen(argv[i]) - 8); ++ sscanf(timeout_l,"%d", &timeout); ++ D(pamh, "timeout specified as: %d",timeout); ++ } + } + } + +-- +1.7.2.5 + diff --git a/fprintd.spec b/fprintd.spec new file mode 100644 index 0000000..90b8be3 --- /dev/null +++ b/fprintd.spec @@ -0,0 +1,102 @@ +Name: fprintd +Version: 0.4.1 +Release: alt1.1 +Summary: D-Bus service for Fingerprint reader access +Group: System/Servers +Url: http://www.freedesktop.org/wiki/Software/fprint/fprintd +License: GPLv2+ + +Source: %name-%version.tar +Source1: system-auth-fprintd +Patch: %name-%version-%release.patch +Patch1: %name-%version-alt-build.patch +Patch2: %name-%version-debian-pam_args.patch +Patch3: %name-%version-alt-pam_docs.patch + +BuildRequires: libdbus-glib-devel libfprint-devel libpam0-devel libpolkit-devel +BuildRequires: gtk-doc intltool + +%description +D-Bus service to access fingerprint readers. + +%package -n pam_fprintd +Summary: PAM module for fingerprint authentication +Provides: pam_fprint +Obsoletes: pam_fprint <= 0.2 +Group: System/Base + +%description -n pam_fprintd +PAM module that uses the fprintd D-Bus service for fingerprint +authentication. + +%package devel +Summary: Development files for %name +Requires: %name = %version-%release +Group: Development/Other + +%description devel +Development documentation for fprintd, the D-Bus service for +fingerprint readers access. + +%prep +%setup -q +%patch -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + +%build +gtkdocize +%autoreconf +%configure \ + --libdir=/%_lib \ + --libexecdir=%_prefix/libexec \ + --enable-gtk-doc \ + --enable-pam \ + --disable-static +%make_build + +%install +%makeinstall_std +mkdir -p %buildroot%_sysconfdir/pam.d +cp system-auth-fprintd %buildroot%_sysconfdir/pam.d +mkdir -p %buildroot%_localstatedir/fprint +rm -fv %buildroot/%_lib/security/pam_fprintd.{a,la,so.*} +%find_lang %name + +%files -f %name.lang +%doc README COPYING AUTHORS TODO +%config(noreplace) %_sysconfdir/fprintd.conf +%_sysconfdir/pam.d/system-auth-fprintd +%_sysconfdir/dbus-1/system.d/net.reactivated.Fprint.conf +%_bindir/fprintd-* +%_prefix/libexec/fprintd +%_datadir/dbus-1/system-services/net.reactivated.Fprint.service +%_datadir/polkit-1/actions/net.reactivated.fprint.device.policy +%dir %_localstatedir/fprint +%_man1dir/fprintd.1* + +%files -n pam_fprintd +%doc pam/README +/%_lib/security/pam_fprintd.so + +%files devel +%_datadir/gtk-doc/html/fprintd +%_datadir/dbus-1/interfaces/net.reactivated.Fprint.Device.xml +%_datadir/dbus-1/interfaces/net.reactivated.Fprint.Manager.xml + +%changelog +* Thu Mar 15 2018 Igor Vlasenko 0.4.1-alt1.1 +- NMU: added URL + +* Fri Oct 26 2012 Ivan Ovcherenko 0.4.1-alt1 +- 0.4.1 with git updates (closes: #27851) + +* Mon Aug 17 2009 Valery Inozemtsev 0.1-alt3 +- ported to PolicyKit 1 + +* Wed May 27 2009 Valery Inozemtsev 0.1-alt2 +- pam_fprintd: fixed obsoletes + +* Wed May 27 2009 Valery Inozemtsev 0.1-alt1 +- initial release diff --git a/src/device.xml b/src/device.xml index 99912ad..a385366 100644 --- a/src/device.xml +++ b/src/device.xml @@ -189,6 +189,12 @@ + verify-disconnected + + The device was disconnected during the verification, no other actions should be taken, and you shouldn't use the device any more. + + + verify-unknown-error An unknown error occurred (usually a driver problem), Device.VerifyStop should now be called. @@ -253,6 +259,13 @@ + enroll-disconnected + + The device was disconnected during the enrollment, no other actions should be taken, and you shouldn't use the device any more. + + + + enroll-unknown-error An unknown error occurred (usually a driver problem), Device.EnrollStop should now be called. diff --git a/system-auth-fprintd b/system-auth-fprintd new file mode 100644 index 0000000..84f07c2 --- /dev/null +++ b/system-auth-fprintd @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth [success=1 default=ignore] pam_fprintd.so max_tries=3 timeout=30 +auth substack system-auth-local +auth required pam_permit.so +account include system-auth-local +password include system-auth-local +session include system-auth-local