diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-02-05 22:29:40 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-02-05 22:29:40 +0000 |
commit | 58176bc915fb9bc5635fbb85311a6144ddcebe1b (patch) | |
tree | d5a1117a591b32d1252d8cd315312be6e2106492 /eclass/pam.eclass | |
parent | Fix installation with FEATURES="multilib-strict". (diff) | |
download | historical-58176bc915fb9bc5635fbb85311a6144ddcebe1b.tar.gz historical-58176bc915fb9bc5635fbb85311a6144ddcebe1b.tar.bz2 historical-58176bc915fb9bc5635fbb85311a6144ddcebe1b.zip |
Add a function to make it easier to hide non-pam symbols from modules.
Rather than reinventing the wheel and adding a stupid file to each of
the packages, use a single function to create a temporary file and use
that.
Diffstat (limited to 'eclass/pam.eclass')
-rw-r--r-- | eclass/pam.eclass | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/eclass/pam.eclass b/eclass/pam.eclass index 317c6443a52f..7eab465a3af2 100644 --- a/eclass/pam.eclass +++ b/eclass/pam.eclass @@ -1,12 +1,12 @@ # Copyright 2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # Author Diego Pettenò <flameeyes@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.18 2009/12/11 20:33:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.19 2011/02/05 22:29:40 flameeyes Exp $ # # This eclass contains functions to install pamd configuration files and # pam modules. -inherit multilib +inherit multilib flag-o-matic # dopamd <file> [more files] # @@ -92,6 +92,23 @@ getpam_mod_dir() { echo ${PAM_MOD_DIR} } +# pammod_hide_symbols +# +# Hide all non-PAM-used symbols from the module; this function creates a +# simple ld version script that hides all the symbols that are not +# necessary for PAM to load the module, then uses append-flags to make +# sure that it gets used. +pammod_hide_symbols() { + cat - > "${T}"/pam-eclass-pam_symbols.ver <<EOF +{ + global: pam_sm_*; + local: *; +}; +EOF + + append-ldflags -Wl,--version-script="${T}"/pam-eclass-pam_symbols.ver +} + # dopammod <file> [more files] # # Install pam module file in the pam modules' dir for current implementation |