summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-03-14 11:53:30 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-03-14 11:53:30 +0000
commitef00ccf7eb5e59716ead27b151ac4a46d4d12a76 (patch)
treea07f29ee90e4477fd7be4a2f1ae0d4f90c8d2b5c /net-misc/openssh/openssh-4.7_p1-r20.ebuild
parentRemoving Przemyslaw Maciag (troll, #104750) from metadata.xml. (diff)
downloadhistorical-ef00ccf7eb5e59716ead27b151ac4a46d4d12a76.tar.gz
historical-ef00ccf7eb5e59716ead27b151ac4a46d4d12a76.tar.bz2
historical-ef00ccf7eb5e59716ead27b151ac4a46d4d12a76.zip
Disable printing of motd and lastlog when enabling PAM, on the pambase-dependent ebuild, as system-login takes care of that. Closes bug #213234.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'net-misc/openssh/openssh-4.7_p1-r20.ebuild')
-rw-r--r--net-misc/openssh/openssh-4.7_p1-r20.ebuild17
1 files changed, 13 insertions, 4 deletions
diff --git a/net-misc/openssh/openssh-4.7_p1-r20.ebuild b/net-misc/openssh/openssh-4.7_p1-r20.ebuild
index 3c920d06bb34..e9f6e6991b4d 100644
--- a/net-misc/openssh/openssh-4.7_p1-r20.ebuild
+++ b/net-misc/openssh/openssh-4.7_p1-r20.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.7_p1-r20.ebuild,v 1.7 2008/03/06 11:17:38 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.7_p1-r20.ebuild,v 1.8 2008/03/14 11:53:30 flameeyes Exp $
inherit eutils flag-o-matic ccc multilib autotools pam
@@ -135,9 +135,18 @@ src_install() {
keepdir /var/empty
newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
- use pam \
- && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
- && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
+ if use pam; then
+ # Whenever enabling the pam USE flag, enable PAM support on
+ # the configuration file. Also disable password authentication
+ # and printing of motd and last login. The latter is done to
+ # leave those tasks up to PAM itself, through pambase.
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ "${D}"/etc/ssh/sshd_config
+ fi
doman contrib/ssh-copy-id.1
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config