summaryrefslogtreecommitdiffstats
path: root/app-misc/sshsleeper/sshsleeper-0.1.ebuild
blob: ca464abb19f3a08245d8dbab675dc7b37127713c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

inherit eutils toolchain-funcs flag-o-matic

DESCRIPTION="just a sleep app to be used for ssh backdoors"
HOMEPAGE="http://dside.dyndns.org/"

LICENSE="GPL"
SLOT="0"
KEYWORDS="x86 amd64"



src_compile() {
    gcc -o ${PN} "${FILESDIR}"/${PN}.c
}

src_install() {
    dobin ${PN}

    dodir /etc
    echo "duration 14400" > "${D}"/etc/sshsleeper.conf

    dodir /var/lib/sshsleeper
    dodir /var/lib/sshsleeper/.ssh
}

pkg_postinst() {
    enewuser sleep 601 /usr/bin/sshsleeper /var/lib/sshsleeper nogroup -K PASS_MAX_DAYS=31
    fowners sleep.nogroup /var/lib/sshsleeper
    fowners sleep.nogroup /var/lib/sshsleeper/.ssh
    
    einfo ""
    einfo "Please, add sshsleaper to /etc/shells"
}