summaryrefslogtreecommitdiffstats
path: root/app-misc/sshsleeper/sshsleeper-0.1.ebuild
blob: 1fb4c5490c5aa99f849173d9bf3bbb7a665f9c76 (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://darksoft.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"
}