-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all!
Thanks for the job you're doing, on my Compaq 6510b (AES2501) it works
very well.
I installed pam_fprint but I found a few things not so good, so I setted
them up for me. I send these modifications in ml, in case that someone
else find this useful.
Patch summary:
- - Moved first scan out of the do...while loop (otherwise can't print
error messages);
- - If no match, retry until max_tries==0;
- - Added more infos in messages sent on error.
Attachment created with:
$ diff -aburN ../orig/pam_fprint.c pam_fprint.c > patch
- --
Andrea Burattin
e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
sito web: http://www.delas.it
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQIVAwUBR39bsqOwSiBewqkvAQJu6w//SJ/g3otMnEmfx7WrlVFqLYgKGDIK34tV
epf6fIky1cO009y79TBJ6p8PqMs5cxmFnSS9wGBQI3KVT1AE0ef3eER3rx4jFTsE
bCLImajA9sHEBT9n7kdp4F9IUbQKRF8pZUDAUnB1ufx2I49BnfrBOHD1LRYbmBPX
tcfc3ZyI29hrCNoqA1NAckj5Q1Hs8EtndAI93gtLhXy9DPakRUkN8E+y2GTa06ci
KOoyblTpRT9+Up2uPyvCysEO5YQHs1OpXe9+yL8tGliSOMme9IGb2QzMQqP+ey+o
IeLsLDeQlQ2jUrEbv/Gi4xsoYLdUfyKCCzEvN9ZDeHkyn9euysHMglXyEXF8VyiU
TsWQSPVPSzTfvDJFDz6WJBLOeq+h7nffiRtQsssnlEV7u4OwAbybYzcKidS6a2Jx
oCuGxRPVzt4qXv8vX+eMVXL83knbtRc1F4ZJST963vekTHVWhYolA6z2pQgqG+Mn
GlcRAFQOf7hy9GHDos7siNxo6fGgCcnehiLZeeWZpwalY7cVR4JQ3Pqr9x8wCaxw
6ifxlTJWsvau/N4te0DRf06lf+IeL5q6gW/IWLPeebFRy9fnTzZYuSAc/6PU2K6O
RmVVpe2kgK3NjSHJLMr5wv0R0LzkoeGu01Z6izUGmVtMh1PTfxs1btYzg4mOj6D5
xbcy5giT/Gc=
=hg1j
-----END PGP SIGNATURE-----
--- ../../pam_fprint.c 2007-11-19 20:04:23.000000000 +0100
+++ pam_fprint.c 2008-01-05 11:01:33.000000000 +0100
@@ -115,39 +115,56 @@
const char *driver_name =
fp_driver_get_full_name(fp_dev_get_driver(dev));
const char *fstr = fingerstr(finger);
- do {
int r;
char msg[128];
+ char msg2[128];
snprintf(msg, sizeof(msg), "Scan %s finger on %s", fstr,
driver_name);
msg[sizeof(msg) - 1] = 0;
send_info_msg(pamh, msg);
+ do {
r = fp_verify_finger(dev, data);
if (r < 0) {
- snprintf(msg, sizeof(msg), "Fingerprint verification
error %d", r);
- msg[sizeof(msg) - 1] = 0;
+ snprintf(msg2, sizeof(msg2), "Fingerprint verification
error %d.\n"
+ "%s (%d tries remaining).", r, msg, max_tries);
+ msg2[sizeof(msg2) - 1] = 0;
send_err_msg(pamh, msg);
return PAM_AUTHINFO_UNAVAIL;
}
switch (r) {
case FP_VERIFY_NO_MATCH:
- return PAM_AUTH_ERR;
+ snprintf(msg2, sizeof(msg2), "Fingerprint does not
match.\n"
+ "%s (%d tries remaining).", msg, max_tries);
+ msg2[sizeof(msg2) - 1] = 0;
+ send_err_msg(pamh, msg2);
+ //return PAM_AUTH_ERR;
+ break;
case FP_VERIFY_MATCH:
return PAM_SUCCESS;
case FP_VERIFY_RETRY:
- send_info_msg(pamh, "Scan didn't quite work. Please try
again.");
+ snprintf(msg2, sizeof(msg2), "Scan didn't quite work.\n"
+ "%s (%d tries remaining).", msg, max_tries);
+ msg2[sizeof(msg2) - 1] = 0;
+ send_err_msg(pamh, msg2);
break;
case FP_VERIFY_RETRY_TOO_SHORT:
- send_info_msg(pamh, "Swipe was too short, please try
again.");
+ snprintf(msg2, sizeof(msg2), "Swipe was too short.\n"
+ "%s (%d tries remaining).", msg, max_tries);
+ msg2[sizeof(msg2) - 1] = 0;
+ send_err_msg(pamh, msg2);
break;
case FP_VERIFY_RETRY_CENTER_FINGER:
- send_info_msg(pamh, "Please center your finger on the
sensor and "
- "try again.");
+ snprintf(msg2, sizeof(msg2), "Please center your finger
on the "
+ "sensor.\n%s (%d tries remaining).", msg,
max_tries);
+ msg2[sizeof(msg2) - 1] = 0;
+ send_err_msg(pamh, msg2);
break;
case FP_VERIFY_RETRY_REMOVE_FINGER:
- send_info_msg(pamh, "Please remove finger from the
sensor and try "
- "again.");
+ snprintf(msg2, sizeof(msg2), "Please remove finger from
the "
+ "sensor.\n%s (%d tries remaining).", msg,
max_tries);
+ msg2[sizeof(msg2) - 1] = 0;
+ send_err_msg(pamh, msg2);
break;
}
} while (max_tries--);
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint