1 |
flameeyes 11/02/05 22:29:40 |
2 |
|
3 |
Modified: pam.eclass |
4 |
Log: |
5 |
Add a function to make it easier to hide non-pam symbols from modules. |
6 |
|
7 |
Rather than reinventing the wheel and adding a stupid file to each of |
8 |
the packages, use a single function to create a temporary file and use |
9 |
that. |
10 |
|
11 |
Revision Changes Path |
12 |
1.19 eclass/pam.eclass |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/pam.eclass?rev=1.19&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/pam.eclass?rev=1.19&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/pam.eclass?r1=1.18&r2=1.19 |
17 |
|
18 |
Index: pam.eclass |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v |
21 |
retrieving revision 1.18 |
22 |
retrieving revision 1.19 |
23 |
diff -u -r1.18 -r1.19 |
24 |
--- pam.eclass 11 Dec 2009 20:33:11 -0000 1.18 |
25 |
+++ pam.eclass 5 Feb 2011 22:29:40 -0000 1.19 |
26 |
@@ -1,12 +1,12 @@ |
27 |
# Copyright 2004 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License, v2 or later |
29 |
# Author Diego Pettenò <flameeyes@g.o> |
30 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.18 2009/12/11 20:33:11 vapier Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.19 2011/02/05 22:29:40 flameeyes Exp $ |
32 |
# |
33 |
# This eclass contains functions to install pamd configuration files and |
34 |
# pam modules. |
35 |
|
36 |
-inherit multilib |
37 |
+inherit multilib flag-o-matic |
38 |
|
39 |
# dopamd <file> [more files] |
40 |
# |
41 |
@@ -92,6 +92,23 @@ |
42 |
echo ${PAM_MOD_DIR} |
43 |
} |
44 |
|
45 |
+# pammod_hide_symbols |
46 |
+# |
47 |
+# Hide all non-PAM-used symbols from the module; this function creates a |
48 |
+# simple ld version script that hides all the symbols that are not |
49 |
+# necessary for PAM to load the module, then uses append-flags to make |
50 |
+# sure that it gets used. |
51 |
+pammod_hide_symbols() { |
52 |
+ cat - > "${T}"/pam-eclass-pam_symbols.ver <<EOF |
53 |
+{ |
54 |
+ global: pam_sm_*; |
55 |
+ local: *; |
56 |
+}; |
57 |
+EOF |
58 |
+ |
59 |
+ append-ldflags -Wl,--version-script="${T}"/pam-eclass-pam_symbols.ver |
60 |
+} |
61 |
+ |
62 |
# dopammod <file> [more files] |
63 |
# |
64 |
# Install pam module file in the pam modules' dir for current implementation |