summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Brindle <method@gentoo.org>2003-03-25 06:02:52 +0000
committerJoshua Brindle <method@gentoo.org>2003-03-25 06:02:52 +0000
commit90667784d161a7313d9640d51bd1e9cd01592c96 (patch)
tree04b62af8d654c114f6f0f57d0d63d272f3839f0a /sys-apps/shadow
parentlil fix (diff)
downloadhistorical-90667784d161a7313d9640d51bd1e9cd01592c96.tar.gz
historical-90667784d161a7313d9640d51bd1e9cd01592c96.tar.bz2
historical-90667784d161a7313d9640d51bd1e9cd01592c96.zip
install pam.d files for selinux
Diffstat (limited to 'sys-apps/shadow')
-rw-r--r--sys-apps/shadow/ChangeLog5
-rw-r--r--sys-apps/shadow/shadow-4.0.3-r3.ebuild77
2 files changed, 38 insertions, 44 deletions
diff --git a/sys-apps/shadow/ChangeLog b/sys-apps/shadow/ChangeLog
index b5d7ba0a79c7..b7393a4f45d1 100644
--- a/sys-apps/shadow/ChangeLog
+++ b/sys-apps/shadow/ChangeLog
@@ -1,6 +1,6 @@
# ChangeLog for sys-apps/shadow
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.30 2003/03/24 03:18:55 method Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.31 2003/03/25 06:02:52 method Exp $
*shadow-4.0.3-r4 (23 Feb 2003)
@@ -29,6 +29,9 @@
*shadow-4.0.3-r3 (25 Dec 2002)
+ 24 Mar 2003; Joshua Brindle <method@gentoo.org> shadow-4.0.3-r3.ebuild:
+ added pam.d files for selinux builds
+
23 Mar 2003; Joshua Brindle <method@gentoo.org> shadow-4.0.3-r3.ebuild:
added selinux support, thanks sindian
diff --git a/sys-apps/shadow/shadow-4.0.3-r3.ebuild b/sys-apps/shadow/shadow-4.0.3-r3.ebuild
index 1b3dac3f5d6a..9d6cee5dd6e1 100644
--- a/sys-apps/shadow/shadow-4.0.3-r3.ebuild
+++ b/sys-apps/shadow/shadow-4.0.3-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.3-r3.ebuild,v 1.8 2003/03/24 21:15:05 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.3-r3.ebuild,v 1.9 2003/03/25 06:02:52 method Exp $
IUSE="selinux"
@@ -28,10 +28,7 @@ RDEPEND=">=sys-libs/pam-0.75-r4
pkg_preinst() {
- if [ -z "`use selinux`" ]
- then
- rm -f ${ROOT}/etc/pam.d/system-auth.new
- fi
+ rm -f ${ROOT}/etc/pam.d/system-auth.new
}
src_unpack() {
@@ -112,22 +109,19 @@ src_install() {
# From sys-apps/pam-login now
# insopts -m0644 ; doins ${FILESDIR}/login.defs
- if [ -z "`use selinux`" ]
- then
- insinto /etc/pam.d ; insopts -m0644
- for x in ${FILESDIR}/pam.d/*
- do
- [ -f ${x} ] && doins ${x}
- done
-
- cd ${FILESDIR}/pam.d
- newins system-auth system-auth.new
- newins shadow chage
- newins shadow chsh
- newins shadow chfn
- newins shadow useradd
- newins shadow groupadd
- fi
+ insinto /etc/pam.d ; insopts -m0644
+ for x in ${FILESDIR}/pam.d/*
+ do
+ [ -f ${x} ] && doins ${x}
+ done
+
+ cd ${FILESDIR}/pam.d
+ newins system-auth system-auth.new
+ newins shadow chage
+ newins shadow chsh
+ newins shadow chfn
+ newins shadow useradd
+ newins shadow groupadd
cd ${S}
# The manpage install is beyond my comprehension, and
@@ -160,28 +154,25 @@ src_install() {
}
pkg_postinst() {
- if [ -z "`use selinux`" ]
- then
- local CHECK1="$(md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1)"
- local CHECK2="$(md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1)"
-
- if [ "${CHECK1}" != "${CHECK2}" -a "${FORCE_SYSTEMAUTH_UPDATE}" = "yes" ]
- then
- ewarn "Due to a security issue, ${ROOT}etc/pam.d/system-auth "
- ewarn "is being updated automatically. Your old "
- ewarn "system-auth will be backed up as:"
- ewarn
- ewarn " ${ROOT}etc/pam.d/system-auth.bak"
- echo
-
- cp -a ${ROOT}/etc/pam.d/system-auth \
- ${ROOT}/etc/pam.d/system-auth.bak;
- mv -f ${ROOT}/etc/pam.d/system-auth.new \
- ${ROOT}/etc/pam.d/system-auth
- rm -f ${ROOT}/etc/pam.d/._cfg????_system-auth
- else
- rm -f ${ROOT}/etc/pam.d/system-auth.new
- fi
+ local CHECK1="$(md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1)"
+ local CHECK2="$(md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1)"
+
+ if [ "${CHECK1}" != "${CHECK2}" -a "${FORCE_SYSTEMAUTH_UPDATE}" = "yes" ]
+ then
+ ewarn "Due to a security issue, ${ROOT}etc/pam.d/system-auth "
+ ewarn "is being updated automatically. Your old "
+ ewarn "system-auth will be backed up as:"
+ ewarn
+ ewarn " ${ROOT}etc/pam.d/system-auth.bak"
+ echo
+
+ cp -a ${ROOT}/etc/pam.d/system-auth \
+ ${ROOT}/etc/pam.d/system-auth.bak;
+ mv -f ${ROOT}/etc/pam.d/system-auth.new \
+ ${ROOT}/etc/pam.d/system-auth
+ rm -f ${ROOT}/etc/pam.d/._cfg????_system-auth
+ else
+ rm -f ${ROOT}/etc/pam.d/system-auth.new
fi
}