|
Lines 2-8
Link Here
|
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /home/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.3-r7.ebuild,v 1.5 2003/09/26 19:55:11 azarah Exp $ |
3 |
# $Header: /home/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.3-r7.ebuild,v 1.5 2003/09/26 19:55:11 azarah Exp $ |
| 4 |
|
4 |
|
| 5 |
IUSE="" |
5 |
IUSE="pam" |
| 6 |
|
6 |
|
| 7 |
inherit eutils libtool gnuconfig |
7 |
inherit eutils libtool gnuconfig |
| 8 |
|
8 |
|
|
Lines 17-29
Link Here
|
| 17 |
SLOT="0" |
17 |
SLOT="0" |
| 18 |
KEYWORDS="x86 amd64 ppc sparc alpha mips hppa arm ia64" |
18 |
KEYWORDS="x86 amd64 ppc sparc alpha mips hppa arm ia64" |
| 19 |
|
19 |
|
| 20 |
DEPEND=">=sys-libs/pam-0.75-r4 |
20 |
DEPEND=">=sys-libs/cracklib-2.7-r3 |
| 21 |
>=sys-libs/cracklib-2.7-r3 |
21 |
pam? ( >=sys-libs/pam-0.75-r4 ) |
| 22 |
nls? ( sys-devel/gettext )" |
22 |
nls? ( sys-devel/gettext )" |
| 23 |
|
23 |
|
| 24 |
RDEPEND=">=sys-libs/pam-0.75-r4 |
24 |
RDEPEND=">=sys-libs/cracklib-2.7-r3 |
| 25 |
>=sys-libs/cracklib-2.7-r3" |
25 |
pam? ( >=sys-libs/pam-0.75-r4 )" |
| 26 |
|
|
|
| 27 |
|
26 |
|
| 28 |
pkg_preinst() { |
27 |
pkg_preinst() { |
| 29 |
rm -f ${ROOT}/etc/pam.d/system-auth.new |
28 |
rm -f ${ROOT}/etc/pam.d/system-auth.new |
|
Lines 38-44
Link Here
|
| 38 |
# pam_xauth for one, is then never used. This should close bug #8831. |
37 |
# pam_xauth for one, is then never used. This should close bug #8831. |
| 39 |
# |
38 |
# |
| 40 |
# <azarah@gentoo.org> (19 Oct 2002) |
39 |
# <azarah@gentoo.org> (19 Oct 2002) |
| 41 |
epatch ${FILESDIR}/${P}-su-pam_open_session.patch-v2 |
40 |
use pam && epatch ${FILESDIR}/${P}-su-pam_open_session.patch-v2 |
| 42 |
|
41 |
|
| 43 |
# If su should not simulate a login shell, use '/bin/sh' as shell to enable |
42 |
# If su should not simulate a login shell, use '/bin/sh' as shell to enable |
| 44 |
# running of commands as user with /bin/false as shell, closing bug #15015. |
43 |
# running of commands as user with /bin/false as shell, closing bug #15015. |
|
Lines 60-70
Link Here
|
| 60 |
|
59 |
|
| 61 |
local myconf="" |
60 |
local myconf="" |
| 62 |
use nls || myconf="${myconf} --disable-nls" |
61 |
use nls || myconf="${myconf} --disable-nls" |
|
|
62 |
use pam && myconf="${myconf} --with-libpam --with-libcrack" || myconf="${myconf} --without-libpam" |
| 63 |
# Note: configure.in has no targets to explicitly turn off pam but we |
| 64 |
# leave this in there anyway incase a new version does |
| 63 |
|
65 |
|
| 64 |
./configure --disable-desrpc \ |
66 |
./configure --disable-desrpc \ |
| 65 |
--with-libcrypt \ |
67 |
--with-libcrypt \ |
| 66 |
--with-libcrack \ |
68 |
--with-libcrack \ |
| 67 |
--with-libpam \ |
|
|
| 68 |
--enable-shared=no \ |
69 |
--enable-shared=no \ |
| 69 |
--enable-static=yes \ |
70 |
--enable-static=yes \ |
| 70 |
--host=${CHOST} \ |
71 |
--host=${CHOST} \ |
|
Lines 85-91
Link Here
|
| 85 |
# Do not install this login, but rather the one from |
86 |
# Do not install this login, but rather the one from |
| 86 |
# pam-login, as this one have a serious root exploit |
87 |
# pam-login, as this one have a serious root exploit |
| 87 |
# with pam_limits in use. |
88 |
# with pam_limits in use. |
| 88 |
rm ${D}/bin/login |
89 |
use pam && rm ${D}/bin/login |
| 89 |
|
90 |
|
| 90 |
mv ${D}/lib ${D}/usr |
91 |
mv ${D}/lib ${D}/usr |
| 91 |
dosed "s:/lib':/usr/lib':g" /usr/lib/libshadow.la |
92 |
dosed "s:/lib':/usr/lib':g" /usr/lib/libshadow.la |
|
Lines 109-131
Link Here
|
| 109 |
insinto /etc/default |
110 |
insinto /etc/default |
| 110 |
insopts -m0600 |
111 |
insopts -m0600 |
| 111 |
doins ${FILESDIR}/default/useradd |
112 |
doins ${FILESDIR}/default/useradd |
| 112 |
# From sys-apps/pam-login now |
113 |
if [ `use pam` ] ; then |
| 113 |
# insopts -m0644 ; doins ${FILESDIR}/login.defs |
114 |
# From sys-apps/pam-login now |
| 114 |
|
115 |
# insopts -m0644 ; doins ${FILESDIR}/login.defs |
| 115 |
insinto /etc/pam.d ; insopts -m0644 |
116 |
insinto /etc/pam.d ; insopts -m0644 |
| 116 |
for x in ${FILESDIR}/pam.d/* |
117 |
for x in ${FILESDIR}/pam.d/* ; do |
| 117 |
do |
118 |
[ -f ${x} ] && doins ${x} |
| 118 |
[ -f ${x} ] && doins ${x} |
119 |
done |
| 119 |
done |
120 |
cd ${FILESDIR}/pam.d |
| 120 |
|
121 |
newins system-auth-1.1 system-auth.new || die |
| 121 |
cd ${FILESDIR}/pam.d |
122 |
newins shadow chage |
| 122 |
newins system-auth-1.1 system-auth.new || die |
123 |
newins shadow chsh |
| 123 |
newins shadow chage |
124 |
newins shadow chfn |
| 124 |
newins shadow chsh |
125 |
newins shadow useradd |
| 125 |
newins shadow chfn |
126 |
newins shadow groupadd |
| 126 |
newins shadow useradd |
127 |
fi |
| 127 |
newins shadow groupadd |
|
|
| 128 |
|
| 129 |
cd ${S} |
128 |
cd ${S} |
| 130 |
# The manpage install is beyond my comprehension, and |
129 |
# The manpage install is beyond my comprehension, and |
| 131 |
# also broken. Just do it over. |
130 |
# also broken. Just do it over. |
|
Lines 135-145
Link Here
|
| 135 |
[ -f ${x} ] && doman ${x} |
134 |
[ -f ${x} ] && doman ${x} |
| 136 |
done |
135 |
done |
| 137 |
|
136 |
|
| 138 |
# Dont install the manpage, since we dont use |
137 |
if [ ! `use pam` ] ; then |
| 139 |
# login with shadow |
138 |
# Dont install the manpage, since we dont use |
| 140 |
rm -f ${D}/usr/share/man/man1/login.* |
139 |
# login with shadow |
| 141 |
# We use pam, so this is not applicable. |
140 |
rm -f ${D}/usr/share/man/man1/login.* |
| 142 |
rm -f ${D}/usr/share/man/man5/suauth.* |
141 |
# We use pam, so this is not applicable. |
|
|
142 |
rm -f ${D}/usr/share/man/man5/suauth.* |
| 143 |
fi |
| 143 |
|
144 |
|
| 144 |
cd ${S}/doc |
145 |
cd ${S}/doc |
| 145 |
dodoc ANNOUNCE INSTALL LICENSE README WISHLIST |
146 |
dodoc ANNOUNCE INSTALL LICENSE README WISHLIST |
|
Lines 156-161
Link Here
|
| 156 |
} |
157 |
} |
| 157 |
|
158 |
|
| 158 |
pkg_postinst() { |
159 |
pkg_postinst() { |
|
|
160 |
use pam || return 0; |
| 159 |
local CHECK1="$(md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1)" |
161 |
local CHECK1="$(md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1)" |
| 160 |
local CHECK2="$(md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1)" |
162 |
local CHECK2="$(md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1)" |
| 161 |
|
163 |
|