aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2014-08-25 01:24:02 +0800
committeradamw <adamw@FreeBSD.org>2014-08-25 01:24:02 +0800
commit2cb0b20ca633dcc201b0a14536029f2475fdbc62 (patch)
tree19ab7af479b34d549348e2c8979b7ab80cc03554 /security
parentb5b40294f792ef6e2508516bc87c4373b0a70bd3 (diff)
downloadfreebsd-ports-gnome-2cb0b20ca633dcc201b0a14536029f2475fdbc62.tar.gz
freebsd-ports-gnome-2cb0b20ca633dcc201b0a14536029f2475fdbc62.tar.zst
freebsd-ports-gnome-2cb0b20ca633dcc201b0a14536029f2475fdbc62.zip
Add security/fprintd.
Fprintd is a D-Bus daemon that offers libfprint functionality over the D-Bus interprocess communication bus. By adding this daemon layer above libfprint, we solve various problems related to multiple applications simulatenously competing for fingerprint readers. While it is not very nice to think of a daemon being necessary in this scenario, fprintd will be launched by D-Bus through the activation mechanism. This means it is launched only when needed, and additionally it will shut itself down after a period of inactivity. (Text copied from link below.) WWW: http://www.freedesktop.org/wiki/Software/fprint/fprintd/ PR: 192683 Submitted by: Martin Birgmeier
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/fprintd/Makefile27
-rw-r--r--security/fprintd/distinfo2
-rw-r--r--security/fprintd/files/patch-pam-Makefile.in11
-rw-r--r--security/fprintd/files/patch-pam-pam_fprintd.c51
-rw-r--r--security/fprintd/files/patch-po-Makefile.in.in11
-rw-r--r--security/fprintd/pkg-descr13
-rw-r--r--security/fprintd/pkg-plist59
8 files changed, 175 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 6d50367b3665..e86f9893e3bd 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -129,6 +129,7 @@
SUBDIR += fpc-openssl
SUBDIR += fpm2
SUBDIR += fprint_demo
+ SUBDIR += fprintd
SUBDIR += fragroute
SUBDIR += fragrouter
SUBDIR += fsh
diff --git a/security/fprintd/Makefile b/security/fprintd/Makefile
new file mode 100644
index 000000000000..d9b7a153eef2
--- /dev/null
+++ b/security/fprintd/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME= fprintd
+PORTVERSION= 0.5.1
+CATEGORIES= security
+MASTER_SITES= http://people.freedesktop.org/~hadess/
+
+MAINTAINER= la5lbtyi@aon.at
+COMMENT= Daemon that provides fingerprint scanning functionality over D-Bus
+
+LICENSE= GPLv2
+
+LIB_DEPENDS= libfprint.so:${PORTSDIR}/security/libfprint \
+ libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \
+ libpolkit-gobject-1.so:${PORTSDIR}/sysutils/polkit
+
+GNU_CONFIGURE= yes
+USES= tar:xz gmake libtool pkgconfig
+USE_GNOME= intltool glib20
+
+OPTIONS_DEFINE= NLS
+OPTIONS_SUB= yes
+
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
+
+.include <bsd.port.mk>
diff --git a/security/fprintd/distinfo b/security/fprintd/distinfo
new file mode 100644
index 000000000000..6ed441c66bfc
--- /dev/null
+++ b/security/fprintd/distinfo
@@ -0,0 +1,2 @@
+SHA256 (fprintd-0.5.1.tar.xz) = 9256970fe30cb0332c1932fc0dad3c8d83570eb8e153305e9430e3cd90806e58
+SIZE (fprintd-0.5.1.tar.xz) = 285336
diff --git a/security/fprintd/files/patch-pam-Makefile.in b/security/fprintd/files/patch-pam-Makefile.in
new file mode 100644
index 000000000000..8659532554da
--- /dev/null
+++ b/security/fprintd/files/patch-pam-Makefile.in
@@ -0,0 +1,11 @@
+--- ./pam/Makefile.in.ORIG 2013-08-11 18:21:32.000000000 +0200
++++ ./pam/Makefile.in 2014-04-21 15:40:09.000000000 +0200
+@@ -364,7 +364,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ @HAVE_PAM_TRUE@pammod_LTLIBRARIES = pam_fprintd.la
+-@HAVE_PAM_TRUE@pammoddir = $(libdir)/security
++@HAVE_PAM_TRUE@pammoddir = $(libdir)
+ @HAVE_PAM_TRUE@pam_fprintd_la_SOURCES = pam_fprintd.c $(MARSHALFILES)
+ @HAVE_PAM_TRUE@pam_fprintd_la_CFLAGS = -fPIC $(WARN_CFLAGS) $(GLIB_CFLAGS) -DLOCALEDIR="\"$(localedir)\""
+ @HAVE_PAM_TRUE@pam_fprintd_la_LDFLAGS = -avoid-version -module -Wl,-z,nodelete
diff --git a/security/fprintd/files/patch-pam-pam_fprintd.c b/security/fprintd/files/patch-pam-pam_fprintd.c
new file mode 100644
index 000000000000..49d195244393
--- /dev/null
+++ b/security/fprintd/files/patch-pam-pam_fprintd.c
@@ -0,0 +1,51 @@
+From 7e4630ced2be4b7ecdfb9d60cfe0e0d3de594411 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Mon, 27 Jan 2014 12:24:14 +0100
+Subject: pam: Fix eventfd leak
+
+When we create our own GMainContext, we need to be the ones
+disposing of it as well, as GMainLoop won't take ownership of it.
+
+From https://bugzilla.redhat.com/show_bug.cgi?id=1050827
+
+diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c
+index 0f5e5a4..07302a1 100644
+--- pam/pam_fprintd.c
++++ pam/pam_fprintd.c
+@@ -170,6 +170,17 @@ static void close_and_unref (DBusGConnection *connection)
+ dbus_g_connection_unref (connection);
+ }
+
++static void unref_loop (GMainLoop *loop)
++{
++ GMainContext *ctx;
++
++ /* The main context was created separately, so
++ * we'll need to unref it ourselves */
++ ctx = g_main_loop_get_context (loop);
++ g_main_loop_unref (loop);
++ g_main_context_unref (ctx);
++}
++
+ #define DBUS_TYPE_G_OBJECT_PATH_ARRAY (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
+
+ static DBusGProxy *open_device(pam_handle_t *pamh, DBusGConnection *connection, DBusGProxy *manager, const char *username, gboolean *has_multiple_devices)
+@@ -397,13 +408,13 @@ static int do_auth(pam_handle_t *pamh, const char *username)
+ dev = open_device(pamh, connection, manager, username, &has_multiple_devices);
+ g_object_unref (manager);
+ if (!dev) {
+- g_main_loop_unref (loop);
++ unref_loop (loop);
+ close_and_unref (connection);
+ return PAM_AUTHINFO_UNAVAIL;
+ }
+ ret = do_verify(loop, pamh, dev, has_multiple_devices);
+
+- g_main_loop_unref (loop);
++ unref_loop (loop);
+ release_device(pamh, dev);
+ g_object_unref (dev);
+ close_and_unref (connection);
+--
+cgit v0.10.2
+
diff --git a/security/fprintd/files/patch-po-Makefile.in.in b/security/fprintd/files/patch-po-Makefile.in.in
new file mode 100644
index 000000000000..1b4c0b5c2606
--- /dev/null
+++ b/security/fprintd/files/patch-po-Makefile.in.in
@@ -0,0 +1,11 @@
+--- ./po/Makefile.in.in.ORIG 2013-08-11 17:56:10.000000000 +0200
++++ ./po/Makefile.in.in 2014-04-21 15:36:34.000000000 +0200
+@@ -34,7 +34,7 @@
+ datarootdir = @datarootdir@
+ libdir = @libdir@
+ DATADIRNAME = @DATADIRNAME@
+-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
++itlocaledir = @localedir@
+ subdir = po
+ install_sh = @install_sh@
+ # Automake >= 1.8 provides @mkdir_p@.
diff --git a/security/fprintd/pkg-descr b/security/fprintd/pkg-descr
new file mode 100644
index 000000000000..47fe53100d74
--- /dev/null
+++ b/security/fprintd/pkg-descr
@@ -0,0 +1,13 @@
+Fprintd is a D-Bus daemon that offers libfprint functionality over
+the D-Bus interprocess communication bus. By adding this daemon
+layer above libfprint, we solve various problems related to multiple
+applications simulatenously competing for fingerprint readers.
+
+While it is not very nice to think of a daemon being necessary in
+this scenario, fprintd will be launched by D-Bus through the
+activation mechanism. This means it is launched only when needed,
+and additionally it will shut itself down after a period of inactivity.
+
+(Text copied from link below.)
+
+WWW: http://www.freedesktop.org/wiki/Software/fprint/fprintd/
diff --git a/security/fprintd/pkg-plist b/security/fprintd/pkg-plist
new file mode 100644
index 000000000000..770ae495d2bd
--- /dev/null
+++ b/security/fprintd/pkg-plist
@@ -0,0 +1,59 @@
+bin/fprintd-delete
+bin/fprintd-enroll
+bin/fprintd-list
+bin/fprintd-verify
+etc/dbus-1/system.d/net.reactivated.Fprint.conf
+etc/fprintd.conf
+lib/pam_fprintd.a
+lib/pam_fprintd.so
+libexec/fprintd
+man/man1/fprintd.1.gz
+share/dbus-1/interfaces/net.reactivated.Fprint.Device.xml
+share/dbus-1/interfaces/net.reactivated.Fprint.Manager.xml
+share/dbus-1/system-services/net.reactivated.Fprint.service
+%%NLS%%share/locale/ar/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/bg_BG/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/bn_IN/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ca@valencia/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/de/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/el/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/en_GB/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/eo/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/es/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/fa_IR/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/fi/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/fo/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ga/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/he/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/hi/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/hr/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/id/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/it/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/kk/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/lt/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/lv/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/pa/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/sl/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/sr/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/sr@latin/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/te/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/wa/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/fprintd.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/fprintd.mo
+share/polkit-1/actions/net.reactivated.fprint.device.policy