Lines 4-10
Link Here
|
4 |
|
4 |
|
5 |
inherit eutils |
5 |
inherit eutils |
6 |
|
6 |
|
7 |
IUSE="ipv6 static pam tcpd kerberos selinux" |
7 |
IUSE="ipv6 static pam tcpd kerberos selinux daemontools" |
8 |
IUSE="${IUSE} X509" |
8 |
IUSE="${IUSE} X509" |
9 |
|
9 |
|
10 |
X509_PATCH=${P/_/}+x509g2.diff.gz |
10 |
X509_PATCH=${P/_/}+x509g2.diff.gz |
Lines 24-29
Link Here
|
24 |
RDEPEND="virtual/glibc |
24 |
RDEPEND="virtual/glibc |
25 |
pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 ) |
25 |
pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 ) |
26 |
kerberos? ( app-crypt/mit-krb5 ) |
26 |
kerberos? ( app-crypt/mit-krb5 ) |
|
|
27 |
daemontools? ( >=sys-apps/daemontools-0.76 ) |
27 |
selinux? ( sys-apps/selinux-small ) |
28 |
selinux? ( sys-apps/selinux-small ) |
28 |
>=dev-libs/openssl-0.9.6d |
29 |
>=dev-libs/openssl-0.9.6d |
29 |
sys-libs/zlib" |
30 |
sys-libs/zlib" |
Lines 37-42
Link Here
|
37 |
LICENSE="as-is" |
38 |
LICENSE="as-is" |
38 |
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~arm ~amd64" |
39 |
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~arm ~amd64" |
39 |
|
40 |
|
|
|
41 |
pkg_setup() { |
42 |
if use daemontools ; then |
43 |
if ! grep -q ^sshlog /etc/group ; then |
44 |
groupadd sshlog || die "Failed to add group: sshlog" |
45 |
fi |
46 |
|
47 |
if ! grep -q ^sshlog /etc/passwd ; then |
48 |
useradd -g sshlog -d /dev/null -s /dev/null sshlog || die "Failed to add user: sshlog" |
49 |
fi |
50 |
fi |
51 |
} |
52 |
|
40 |
src_unpack() { |
53 |
src_unpack() { |
41 |
unpack ${PARCH}.tar.gz |
54 |
unpack ${PARCH}.tar.gz |
42 |
cd ${S} |
55 |
cd ${S} |
Lines 105-110
Link Here
|
105 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
118 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
106 |
insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd |
119 |
insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd |
107 |
exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd |
120 |
exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd |
|
|
121 |
if use daemontools && [ ! -d /etc/ssh/supervise ] ; then |
122 |
diropts -m 755 -o root |
123 |
dodir /etc/ssh/supervise /etc/ssh/supervise/log |
124 |
exeinto /etc/ssh/supervise ; newexe ${FILESDIR}/sshd.supervise.run run |
125 |
exeinto /etc/ssh/supervise/log ; newexe ${FILESDIR}/sshd.supervise.log run |
126 |
|
127 |
diropts -m 755 -o sshlog -g sshlog |
128 |
dodir /var/log/sshd |
129 |
keepdir /var/log/sshd |
130 |
fi |
131 |
|
108 |
touch ${D}/var/empty/.keep |
132 |
touch ${D}/var/empty/.keep |
109 |
} |
133 |
} |
110 |
|
134 |
|
Lines 125-130
Link Here
|
125 |
# empty dir for the new priv separation auth chroot.. |
149 |
# empty dir for the new priv separation auth chroot.. |
126 |
install -d -m0755 -o root -g root ${ROOT}/var/empty |
150 |
install -d -m0755 -o root -g root ${ROOT}/var/empty |
127 |
|
151 |
|
|
|
152 |
if [ ! -e /etc/ssh/ssh_host_key ] ; then |
153 |
einfo "Generating Hostkey..." |
154 |
/usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N '' |
155 |
fi |
156 |
if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then |
157 |
einfo "Generating DSA-Hostkey..." |
158 |
/usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' |
159 |
fi |
160 |
if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then |
161 |
einfo "Generating RSA-Hostkey..." |
162 |
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' |
163 |
fi |
164 |
|
128 |
einfo |
165 |
einfo |
129 |
einfo "Remember to merge your config files in /etc/ssh!" |
166 |
einfo "Remember to merge your config files in /etc/ssh!" |
130 |
einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation" |
167 |
einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation" |