[Fingerforce-commits] [fprintd] 02/06: Drop 'max_tries and timeout' patch, incorporated upstream

Didier Raboud odyx at alioth.debian.org
Sun Sep 29 14:10:26 UTC 2013


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian
in repository fprintd.

commit b8b886550e3f4e3392d50ca03fb5a94244ebcbc6
Author: Didier Raboud <odyx at debian.org>
Date:   Sun Sep 29 14:47:16 2013 +0200

    Drop 'max_tries and timeout' patch, incorporated upstream
---
 debian/patches/series                              |    1 -
 ..._pam_Make_max_tries_and_timeout_arguments.patch |   93 --------------------
 2 files changed, 94 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
index b795511..b732fba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 # Upstream patches
-u9c99e5c_pam_Make_max_tries_and_timeout_arguments.patch
 
 # Debian patches
 0_put_fprint_daemon_in_sbin.patch
diff --git a/debian/patches/u9c99e5c_pam_Make_max_tries_and_timeout_arguments.patch b/debian/patches/u9c99e5c_pam_Make_max_tries_and_timeout_arguments.patch
deleted file mode 100644
index f6afd1c..0000000
--- a/debian/patches/u9c99e5c_pam_Make_max_tries_and_timeout_arguments.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 9c99e5cd59fc942ea0d5f5d1263424eaf78c27b4 Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx at debian.org>
-Date: Mon, 14 May 2012 17:29:56 +0200
-Subject: [PATCH] pam: Make max_tries and timeout arguments.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=49918
----
- pam/pam_fprintd.c |   34 +++++++++++++++++++++++++++-------
- 1 files changed, 27 insertions(+), 7 deletions(-)
-
-diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c
-index 52fce32..7e1f954 100644
---- a/pam/pam_fprintd.c
-+++ b/pam/pam_fprintd.c
-@@ -21,6 +21,7 @@
- #include <config.h>
- 
- #include <stdio.h>
-+#include <stdlib.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <string.h>
-@@ -39,8 +40,11 @@
- 
- #include "fingerprint-strings.h"
- 
--#define MAX_TRIES 3
--#define TIMEOUT 30
-+#define DEFAULT_MAX_TRIES 3
-+#define DEFAULT_TIMEOUT 30
-+
-+#define MAX_TRIES_MATCH "max-tries="
-+#define TIMEOUT_MATCH "timeout="
- 
- #define D(pamh, ...) {					\
- 	if (debug) {					\
-@@ -53,6 +57,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 +277,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 +310,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 +435,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_MATCH, strlen (MAX_TRIES_MATCH)) == 0 && strlen(argv[i]) == strlen (MAX_TRIES_MATCH) + 1) {
-+				max_tries = atoi (argv[i] + strlen (MAX_TRIES_MATCH));
-+				if (max_tries < 1)
-+					max_tries = DEFAULT_MAX_TRIES;
-+				D(pamh, "max_tries specified as: %d", max_tries);
-+			}
-+			else if (strncmp(argv[i], TIMEOUT_MATCH, strlen (TIMEOUT_MATCH)) == 0 && strlen(argv[i]) <= strlen (TIMEOUT_MATCH) + 2) {
-+				timeout = atoi (argv[i] + strlen (TIMEOUT_MATCH));
-+				if (timeout < 10)
-+					timeout = DEFAULT_TIMEOUT;
-+				D(pamh, "timeout specified as: %d", timeout);
-+			}
- 		}
- 	}
- 
--- 
-1.7.2.5
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/fingerforce/fprintd.git



More information about the Fingerforce-commits mailing list