first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
38
base/libssh/0.7.4/Dockerfile
Normal file
38
base/libssh/0.7.4/Dockerfile
Normal file
@@ -0,0 +1,38 @@
|
||||
FROM buildpack-deps:stretch-scm
|
||||
|
||||
LABEL maintainer="phithon <root@leavesongs.com>"
|
||||
|
||||
RUN set -ex \
|
||||
&& BUILDDEP="gcc g++ make pkg-config cmake xz-utils" \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
ca-certificates \
|
||||
wget \
|
||||
libc6-dev \
|
||||
zlib1g-dev \
|
||||
libgcrypt20-dev \
|
||||
libgpg-error-dev \
|
||||
libkrb5-dev \
|
||||
$BUILDDEP \
|
||||
&& wget -qO- https://www.libssh.org/files/0.7/libssh-0.7.4.tar.xz \
|
||||
| xz -c -d | tar x -C /usr/src --strip-components=1 \
|
||||
&& mkdir -p /usr/src/build \
|
||||
&& cd /usr/src/build \
|
||||
&& cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DWITH_SERVER=ON \
|
||||
-DWITH_STATIC_LIB=ON \
|
||||
-DWITH_GSSAPI=ON \
|
||||
-DWITH_GCRYPT=ON \
|
||||
-DWITH_SFTP=ON \
|
||||
-DWITH_EXAMPLES=ON \
|
||||
-DWITH_NACL=OFF \
|
||||
-DGSSAPI_LIBRARIES=/usr/lib/x86_64-linux-gnu \
|
||||
-DGSSAPI_INCLUDE_DIR=/usr \
|
||||
.. \
|
||||
&& make && make install \
|
||||
&& apt-get purge -y --auto-remove $BUILDDEP
|
||||
|
||||
CMD [ "/usr/src/build/examples/samplesshd-cb" ]
|
||||
|
||||
|
39
base/libssh/0.8.1/Dockerfile
Normal file
39
base/libssh/0.8.1/Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM buildpack-deps:stretch-scm
|
||||
|
||||
LABEL maintainer="phithon <root@leavesongs.com>"
|
||||
|
||||
COPY ssh_server_fork.patch /ssh_server_fork.patch
|
||||
|
||||
RUN set -ex \
|
||||
&& BUILDDEP="gcc g++ make pkg-config cmake xz-utils patch" \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
ca-certificates \
|
||||
wget \
|
||||
libc6-dev \
|
||||
zlib1g-dev \
|
||||
libgcrypt20-dev \
|
||||
libgpg-error-dev \
|
||||
$BUILDDEP \
|
||||
&& wget -qO- https://www.libssh.org/files/0.8/libssh-0.8.1.tar.xz \
|
||||
| xz -c -d | tar x -C /usr/src --strip-components=1 \
|
||||
&& mkdir -p /usr/src/build \
|
||||
&& patch /usr/src/examples/ssh_server_fork.c < /ssh_server_fork.patch \
|
||||
&& cd /usr/src/build \
|
||||
&& cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DWITH_SERVER=ON \
|
||||
-DWITH_STATIC_LIB=ON \
|
||||
-DWITH_GSSAPI=ON \
|
||||
-DWITH_GCRYPT=ON \
|
||||
-DWITH_SFTP=ON \
|
||||
-DWITH_THREADS=ON \
|
||||
.. \
|
||||
&& make && make install \
|
||||
&& apt-get purge -y --auto-remove $BUILDDEP
|
||||
|
||||
RUN ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -q -N "" \
|
||||
&& ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -q -N "" \
|
||||
&& ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -q -N ""
|
||||
|
||||
CMD /usr/src/build/examples/ssh_server_fork --hostkey=/etc/ssh/ssh_host_rsa_key --ecdsakey=/etc/ssh/ssh_host_ecdsa_key --dsakey=/etc/ssh/ssh_host_dsa_key --rsakey=/etc/ssh/ssh_host_rsa_key -p 22 0.0.0.0
|
11
base/libssh/0.8.1/ssh_server_fork.patch
Normal file
11
base/libssh/0.8.1/ssh_server_fork.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- ssh_server_fork.c 2018-08-10 17:06:03.000000000 +0800
|
||||
+++ ssh_server_fork_patch.c 2018-10-19 13:44:07.000000000 +0800
|
||||
@@ -531,7 +531,7 @@
|
||||
ssh_event_add_session(event, session);
|
||||
|
||||
n = 0;
|
||||
- while (sdata.authenticated == 0 || sdata.channel == NULL) {
|
||||
+ while (sdata.channel == NULL) {
|
||||
/* If the user has used up all attempts, or if he hasn't been able to
|
||||
* authenticate in 10 seconds (n * 100ms), disconnect. */
|
||||
if (sdata.auth_attempts >= 3 || n >= 100) {
|
Reference in New Issue
Block a user