[fprintd/f14/master] Don't every allow pam module to get unloaded

Ray Strode rstrode at fedoraproject.org
Tue Nov 9 18:58:13 UTC 2010


commit 137088124a18ba781e11541ed6ab7033ab92b4b3
Author: Ray Strode <rstrode at redhat.com>
Date:   Tue Nov 9 10:57:14 2010 -0500

    Don't every allow pam module to get unloaded
    
    The PAM module uses dbus-glib, static gobject types, etc,
    so it really can't get unloaded.
    
    This commit adds some linker-fu to keep it resident even
    after the pam module closes.

 dont-ever-unload.patch |   17 +++++++++++++++++
 fprintd.spec           |   10 +++++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/dont-ever-unload.patch b/dont-ever-unload.patch
new file mode 100644
index 0000000..acc01e8
--- /dev/null
+++ b/dont-ever-unload.patch
@@ -0,0 +1,17 @@
+Don't allow PAM module to get unloaded
+
+It uses libraries which can't handle being unloaded very
+gracefully.
+
+diff -up fprintd-0.2.0/pam/Makefile.am.dont-ever-unload fprintd-0.2.0/pam/Makefile.am
+--- fprintd-0.2.0/pam/Makefile.am.dont-ever-unload	2010-11-09 10:55:30.452135193 -0500
++++ fprintd-0.2.0/pam/Makefile.am	2010-11-09 10:55:32.954860614 -0500
+@@ -5,7 +5,7 @@ pammoddir=$(libdir)/security
+ 
+ pam_fprintd_la_SOURCES = pam_fprintd.c $(MARSHALFILES)
+ pam_fprintd_la_CFLAGS = -fPIC $(WARN_CFLAGS) $(GLIB_CFLAGS)
+-pam_fprintd_la_LDFLAGS = -avoid-version -module
++pam_fprintd_la_LDFLAGS = -avoid-version -module -Wl,-z,nodelete
+ pam_fprintd_la_LIBADD = $(PAM_LIBS) $(GLIB_LIBS)
+ 
+ MARSHALFILES = marshal.c marshal.h
diff --git a/fprintd.spec b/fprintd.spec
index 5383e9a..3a07837 100644
--- a/fprintd.spec
+++ b/fprintd.spec
@@ -1,6 +1,6 @@
 Name:		fprintd
 Version:	0.2.0
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	D-Bus service for Fingerprint reader access
 
 Group:		System Environment/Daemons
@@ -18,6 +18,9 @@ BuildRequires:	gtk-doc
 BuildRequires:	intltool
 BuildRequires:  autoconf automake libtool
 
+# http://bugs.freedesktop.org/show_bug.cgi?id=31503
+Patch0:	dont-ever-unload.patch
+
 %description
 D-Bus service to access fingerprint readers.
 
@@ -50,6 +53,7 @@ fingerprint readers access.
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p1 -b .dont-ever-unload
 
 %build
 %configure --libdir=/%{_lib}/ --enable-gtk-doc --enable-pam
@@ -91,6 +95,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/dbus-1/interfaces/net.reactivated.Fprint.Manager.xml
 
 %changelog
+* Tue Nov 09 2010 Ray Strode <rstrode at redhat.com> 0.2.0-2
+- Don't allow pam module to ever get unmapped, since that causes
+  crashes in dbus-glib, gobject, etc.
+
 * Thu Aug 19 2010 Bastien Nocera <bnocera at redhat.com> 0.2.0-1
 - Update to 0.2.0
 


More information about the scm-commits mailing list