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 |
|
8 |
|
9 |
# Make it more portable between straight releases |
9 |
# Make it more portable between straight releases |
10 |
# and _p? releases. |
10 |
# and _p? releases. |
Lines 20-25
Link Here
|
20 |
RDEPEND="virtual/glibc |
20 |
RDEPEND="virtual/glibc |
21 |
pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 ) |
21 |
pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 ) |
22 |
kerberos? ( app-crypt/mit-krb5 ) |
22 |
kerberos? ( app-crypt/mit-krb5 ) |
|
|
23 |
daemontools? ( >=sys-apps/daemontools-0.76 ) |
23 |
selinux? ( sys-apps/selinux-small ) |
24 |
selinux? ( sys-apps/selinux-small ) |
24 |
>=dev-libs/openssl-0.9.6d |
25 |
>=dev-libs/openssl-0.9.6d |
25 |
sys-libs/zlib" |
26 |
sys-libs/zlib" |
Lines 34-39
Link Here
|
34 |
LICENSE="as-is" |
35 |
LICENSE="as-is" |
35 |
KEYWORDS="x86 ppc sparc alpha mips hppa arm amd64" |
36 |
KEYWORDS="x86 ppc sparc alpha mips hppa arm amd64" |
36 |
|
37 |
|
|
|
38 |
pkg_setup() { |
39 |
if use daemontools ; then |
40 |
if ! grep -q ^sshlog /etc/group ; then |
41 |
groupadd sshlog || die "Failed to add group: sshlog" |
42 |
fi |
43 |
|
44 |
if ! grep -q ^sshlog /etc/passwd ; then |
45 |
useradd -g sshlog -d /dev/null -s /dev/null sshlog || die "Failed to add user: sshlog" |
46 |
fi |
47 |
fi |
48 |
} |
49 |
|
37 |
src_unpack() { |
50 |
src_unpack() { |
38 |
unpack ${PARCH}.tar.gz |
51 |
unpack ${PARCH}.tar.gz |
39 |
cd ${S} |
52 |
cd ${S} |
Lines 98-103
Link Here
|
98 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
111 |
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config |
99 |
insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd |
112 |
insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd |
100 |
exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd |
113 |
exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd |
|
|
114 |
if use daemontools && [ ! -d /etc/ssh/supervise ] ; then |
115 |
diropts -m 755 -o root |
116 |
dodir /etc/ssh/supervise /etc/ssh/supervise/log |
117 |
exeinto /etc/ssh/supervise ; newexe ${FILESDIR}/sshd.supervise.run run |
118 |
exeinto /etc/ssh/supervise/log ; newexe ${FILESDIR}/sshd.supervise.log run |
119 |
|
120 |
diropts -m 755 -o sshlog -g sshlog |
121 |
dodir /var/log/sshd |
122 |
keepdir /var/log/sshd |
123 |
fi |
124 |
|
101 |
touch ${D}/var/empty/.keep |
125 |
touch ${D}/var/empty/.keep |
102 |
} |
126 |
} |
103 |
|
127 |
|
Lines 118-123
Link Here
|
118 |
# empty dir for the new priv separation auth chroot.. |
142 |
# empty dir for the new priv separation auth chroot.. |
119 |
install -d -m0755 -o root -g root ${ROOT}/var/empty |
143 |
install -d -m0755 -o root -g root ${ROOT}/var/empty |
120 |
|
144 |
|
|
|
145 |
if [ ! -e /etc/ssh/ssh_host_key ] ; then |
146 |
einfo "Generating Hostkey..." |
147 |
/usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N '' |
148 |
fi |
149 |
if [ ! -e /etc/ssh/ssh_host_dsa_key ] ; then |
150 |
einfo "Generating DSA-Hostkey..." |
151 |
/usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' |
152 |
fi |
153 |
if [ ! -e /etc/ssh/ssh_host_rsa_key ] ; then |
154 |
einfo "Generating RSA-Hostkey..." |
155 |
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' |
156 |
fi |
157 |
|
121 |
einfo |
158 |
einfo |
122 |
einfo "Remember to merge your config files in /etc/ssh!" |
159 |
einfo "Remember to merge your config files in /etc/ssh!" |
123 |
einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation" |
160 |
einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation" |