* [gentoo-commits] gentoo-x86 commit in sys-auth/thinkfinger/files: 0.3-carriagereturn.patch 0.3-tftoolgroup.patch 0.3-direct_set_config_usb_hello.patch 60-thinkfinger.rules
@ 2009-02-18 15:37 Tony Vroon (chainsaw)
0 siblings, 0 replies; only message in thread
From: Tony Vroon (chainsaw) @ 2009-02-18 15:37 UTC (permalink / raw
To: gentoo-commits
chainsaw 09/02/18 15:37:39
Added: 0.3-carriagereturn.patch 0.3-tftoolgroup.patch
0.3-direct_set_config_usb_hello.patch
60-thinkfinger.rules
Log:
Due to lack of hardware I have been unable to attend to this package. I will now however be proxy maintaining for Víctor Enríquez Miguel <victor.quicksilver@gmail.com> , metadata updated to reflect this. Add a fingerprint group so non-root users can use the software, as per the suggestions by Henning Schild <henning@wh9.tu-dresden.de> in bug #228919. Also add explicit chmod/chown statements to the installed script. Do not apply USB configuration 1 to the device, this was never necessary and broke with kernel 2.6.28 ("hello" patch). Added udev rules to make device handling automatic.
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Revision Changes Path
1.1 sys-auth/thinkfinger/files/0.3-carriagereturn.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/0.3-carriagereturn.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/0.3-carriagereturn.patch?rev=1.1&content-type=text/plain
Index: 0.3-carriagereturn.patch
===================================================================
--- pam/pam_thinkfinger-uinput.c 2007-02-27 17:52:50.000000000 +0100
+++ pam/pam_thinkfinger-uinput.c 2009-02-17 13:56:02.013033249 +0100
@@ -95,6 +95,7 @@
/* our single key keyboard */
i = ioctl (*fd, UI_SET_EVBIT, EV_KEY) < 0;
i |= ioctl (*fd, UI_SET_KEYBIT, KEY_ENTER) < 0;
+ i |= ioctl (*fd, UI_SET_KEYBIT, KEY_A) < 0;
if (write (*fd, &device, device_size) != device_size) {
retval = errno;
1.1 sys-auth/thinkfinger/files/0.3-tftoolgroup.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/0.3-tftoolgroup.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/0.3-tftoolgroup.patch?rev=1.1&content-type=text/plain
Index: 0.3-tftoolgroup.patch
===================================================================
--- tf-tool/tf-tool.c 2007-03-30 11:00:45.000000000 +0200
+++ tf-tool/tf-tool.c 2009-02-18 14:57:24.316197097 +0100
@@ -26,6 +26,9 @@
#include <errno.h>
#include <libgen.h>
#include <pwd.h>
+#include <grp.h>
+#include <sys/stat.h>
+#include <unistd.h>
#include <config.h>
#include <libthinkfinger.h>
@@ -54,6 +57,21 @@
int swipe_failed;
} s_tfdata;
+int changegroup(const char *groupname,const char *filename)
+{
+ struct group *g;
+ g = getgrnam(groupname);
+ if(g == NULL) {
+ perror("getgrnam:");
+ return 1;
+ }
+ if( chown(filename,-1,g->gr_gid) == -1) {
+ perror("chown: ");
+ return 1;
+ }
+ return 0;
+}
+
static void print_status (int swipe_success, int swiped_required, int swipe_failed)
{
printf ("\rPlease swipe your finger (successful swipes %i/%i, failed swipes: %i)...",
@@ -64,6 +82,8 @@
static void callback (libthinkfinger_state state, void *data)
{
char *str;
+ int err;
+ gid_t gfp;
s_tfdata *tfdata = (s_tfdata *) data;
if (tfdata->verbose == true) {
@@ -108,8 +128,18 @@
case TF_STATE_ENROLL_SUCCESS:
print_status (tfdata->swipe_success, 3, tfdata->swipe_failed);
printf (" done.\nStoring data (%s)...", tfdata->bir);
- fflush (stdout);
- break;
+ /*small hack to change group and chmod 640 on created bir file*/
+ err = chmod(tfdata->bir, S_IRUSR | S_IWUSR | S_IRGRP);
+ if(err == -1) {
+ printf("Couldn't change perms on file %s\n",tfdata->bir);
+ perror("chmod:");
+ fflush(stdout);
+ break;
+ }
+ changegroup("fingerprint",tfdata->bir);
+ fflush(stdout);
+ break;
+ /*done*/
case TF_STATE_SWIPE_FAILED:
print_status (tfdata->swipe_success, 3, ++tfdata->swipe_failed);
break;
1.1 sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/0.3-direct_set_config_usb_hello.patch?rev=1.1&content-type=text/plain
Index: 0.3-direct_set_config_usb_hello.patch
===================================================================
Index: libthinkfinger/libthinkfinger.c
===================================================================
--- libthinkfinger/libthinkfinger.c (revision 118)
+++ libthinkfinger/libthinkfinger.c (working copy)
@@ -265,18 +265,7 @@
int retval = -1;
char dummy[] = "\x10";
- /* SET_CONFIGURATION 1 -- should not be relevant */
retval = usb_control_msg (handle, // usb_dev_handle *dev
- 0x00000000, // int requesttype
- 0x00000009, // int request
- 0x001, // int value
- 0x000, // int index
- dummy, // char *bytes
- 0x00000000, // int size
- USB_TIMEOUT); // int timeout
- if (retval < 0)
- goto out;
- retval = usb_control_msg (handle, // usb_dev_handle *dev
0x00000040, // int requesttype
0x0000000c, // int request
0x100, // int value
@@ -285,7 +274,6 @@
0x00000001, // int size
USB_TIMEOUT); // int timeout
-out:
return retval;
}
1.1 sys-auth/thinkfinger/files/60-thinkfinger.rules
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/60-thinkfinger.rules?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/thinkfinger/files/60-thinkfinger.rules?rev=1.1&content-type=text/plain
Index: 60-thinkfinger.rules
===================================================================
#
# udev rules file for the thinkfinger fingerprint scanner
#
# gives access to the fingerprint reader to those in the "fingerprint" group
#
# Taken from:
# http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger
# which was taken and modified from:
# http://article.gmane.org/gmane.linux.drivers.thinkfinger/329
#
# SGS Thomson Microelectronics Fingerprint Reader
SYSFS{idVendor}=="0483", SYSFS{idProduct}=="2016", SYMLINK+="input/thinkfinger-%k", MODE="0660", GROUP="fingerprint"
# the also-needed uinput device
KERNEL=="uinput", MODE="0660", GROUP="fingerprint"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-18 15:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-18 15:37 [gentoo-commits] gentoo-x86 commit in sys-auth/thinkfinger/files: 0.3-carriagereturn.patch 0.3-tftoolgroup.patch 0.3-direct_set_config_usb_hello.patch 60-thinkfinger.rules Tony Vroon (chainsaw)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox