1 | # Copyright 2004 Gentoo Foundation |
1 | # Copyright 2004 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License, v2 or later |
2 | # Distributed under the terms of the GNU General Public License, v2 or later |
3 | # Author Diego Pettenò <flameeyes@gentoo.org> |
3 | # Author Diego Pettenò <flameeyes@gentoo.org> |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.18 2009/12/11 20:33:11 vapier Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.19 2011/02/05 22:29:40 flameeyes Exp $ |
5 | # |
5 | # |
6 | # This eclass contains functions to install pamd configuration files and |
6 | # This eclass contains functions to install pamd configuration files and |
7 | # pam modules. |
7 | # pam modules. |
8 | |
8 | |
9 | inherit multilib |
9 | inherit multilib flag-o-matic |
10 | |
10 | |
11 | # dopamd <file> [more files] |
11 | # dopamd <file> [more files] |
12 | # |
12 | # |
13 | # Install pam auth config file in /etc/pam.d |
13 | # Install pam auth config file in /etc/pam.d |
14 | dopamd() { |
14 | dopamd() { |
… | |
… | |
88 | # Unable to find PAM implementation... defaulting |
88 | # Unable to find PAM implementation... defaulting |
89 | PAM_MOD_DIR=/$(get_libdir)/security |
89 | PAM_MOD_DIR=/$(get_libdir)/security |
90 | fi |
90 | fi |
91 | |
91 | |
92 | echo ${PAM_MOD_DIR} |
92 | echo ${PAM_MOD_DIR} |
|
|
93 | } |
|
|
94 | |
|
|
95 | # pammod_hide_symbols |
|
|
96 | # |
|
|
97 | # Hide all non-PAM-used symbols from the module; this function creates a |
|
|
98 | # simple ld version script that hides all the symbols that are not |
|
|
99 | # necessary for PAM to load the module, then uses append-flags to make |
|
|
100 | # sure that it gets used. |
|
|
101 | pammod_hide_symbols() { |
|
|
102 | cat - > "${T}"/pam-eclass-pam_symbols.ver <<EOF |
|
|
103 | { |
|
|
104 | global: pam_sm_*; |
|
|
105 | local: *; |
|
|
106 | }; |
|
|
107 | EOF |
|
|
108 | |
|
|
109 | append-ldflags -Wl,--version-script="${T}"/pam-eclass-pam_symbols.ver |
93 | } |
110 | } |
94 | |
111 | |
95 | # dopammod <file> [more files] |
112 | # dopammod <file> [more files] |
96 | # |
113 | # |
97 | # Install pam module file in the pam modules' dir for current implementation |
114 | # Install pam module file in the pam modules' dir for current implementation |