diff options
author | Sam James (sam_c) <sam@cmpct.info> | 2020-04-13 07:51:16 +0000 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-04-21 01:23:44 -0700 |
commit | af3182b61d2db38d9ad2f4b37fb1196c2961f879 (patch) | |
tree | d6d42f3951766e9940d29b01c319f77ae5c4c334 /net-misc/endlessh/files | |
parent | net-ftp/ncftp: Update HOMEPAGE/SRC_URI/A (diff) | |
download | gentoo-af3182b61d2db38d9ad2f4b37fb1196c2961f879.tar.gz gentoo-af3182b61d2db38d9ad2f4b37fb1196c2961f879.tar.bz2 gentoo-af3182b61d2db38d9ad2f4b37fb1196c2961f879.zip |
net-misc/endlessh: bump to 1.1
Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/15328
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-misc/endlessh/files')
-rw-r--r-- | net-misc/endlessh/files/endlessh-1.1-syslog-help.patch | 24 | ||||
-rw-r--r-- | net-misc/endlessh/files/endlessh.confd-r2 | 29 | ||||
-rw-r--r-- | net-misc/endlessh/files/endlessh.initd-r2 | 30 |
3 files changed, 83 insertions, 0 deletions
diff --git a/net-misc/endlessh/files/endlessh-1.1-syslog-help.patch b/net-misc/endlessh/files/endlessh-1.1-syslog-help.patch new file mode 100644 index 000000000000..ec87997d2f23 --- /dev/null +++ b/net-misc/endlessh/files/endlessh-1.1-syslog-help.patch @@ -0,0 +1,24 @@ +From 3643683c20774afa1606bae5f1c4ccbfd2a905db Mon Sep 17 00:00:00 2001 +From: "Sam James (sam_c)" <sam@cmpct.info> +Date: Tue, 21 Apr 2020 08:09:49 +0000 +Subject: [PATCH] Add -s (syslog) to help output + +Signed-off-by: Sam James (sam_c) <sam@cmpct.info> +--- + endlessh.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/endlessh.c b/endlessh.c +index adb8ad3..8c3afff 100644 +--- a/endlessh.c ++++ b/endlessh.c +@@ -530,6 +530,8 @@ usage(FILE *f) + fprintf(f, " -m INT Maximum number of clients [" + XSTR(DEFAULT_MAX_CLIENTS) "]\n"); + fprintf(f, " -p INT Listening port [" XSTR(DEFAULT_PORT) "]\n"); ++ fprintf(f, " -s Print diagnostics to syslog instead of " ++ "standard output\n"); + fprintf(f, " -v Print diagnostics to standard output " + "(repeatable)\n"); + fprintf(f, " -V Print version information and exit\n"); + diff --git a/net-misc/endlessh/files/endlessh.confd-r2 b/net-misc/endlessh/files/endlessh.confd-r2 new file mode 100644 index 000000000000..062e30f0c164 --- /dev/null +++ b/net-misc/endlessh/files/endlessh.confd-r2 @@ -0,0 +1,29 @@ +# /etc/conf.d/endlessh: config file for /etc/init.d/endlessh +# +#default options used by init.d if this is unset +#ENDLESSH_ARGS="-sv" +# +#Usage: endlessh [-vh] [-46] [-d MS] [-f CONFIG] [-l LEN] [-m LIMIT] [-p PORT] +# -4 Bind to IPv4 only +# -6 Bind to IPv6 only +# -d INT Message millisecond delay [10000] +# -f Set and load config file [/etc/endlessh/config] +# -h Print this help message and exit +# -l INT Maximum banner line length (3-255) [32] +# -m INT Maximum number of clients [4096] +# -p INT Listening port [2222] +# -v Print diagnostics to standard output (repeatable) +# -V Print version information and exit + +# EXAMPLE 1: listen on port 22, log all queries and errors in very verbose mode +#ENDLESSH_ARGS="-p 22 -vv" + +# EXAMPLE 2: load settings from config file +#ENDLESSH_ARGS="-f /etc/endlessh/config" + +# EXAMPLE 3: load settings from config file, but override port +#ENDLESSH_ARGS="-f /etc/endlessh/config -p 22" + +# LOGGING: by default is syslog +# You can add -v (or -vv) for verbosity +#ENDLESSH_ARGS="-s -v" diff --git a/net-misc/endlessh/files/endlessh.initd-r2 b/net-misc/endlessh/files/endlessh.initd-r2 new file mode 100644 index 000000000000..0b995f683d91 --- /dev/null +++ b/net-misc/endlessh/files/endlessh.initd-r2 @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +depend() { + after bootmisc + need localmount + use clock logger net +} + +description="Starts endlessh tarpit" + +command="/usr/bin/endlessh" +# NOTE: You will need to add -s to ENDLESSH_ARGS in /etc/conf.d/endlessh if modified to keep syslog +command_args="${ENDLESSH_ARGS:--sv}" +command_background="true" +extra_started_commands="dumpstats reload" +pidfile="/run/${RC_SVCNAME}.pid" + +dumpstats() { + ebegin "Dumping connection stats of ${RC_SVCNAME} to log" + start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}" + eend $? +} + +reload() { + ebegin "Reloading ${RC_SVCNAME} configuration" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} |