Skip to content

Commit e13c36b

Browse files
Update the dependencies as of April 2025 (#88)
* Update the dependencies as of April 2025 * Fix PAM module is unknown error * Update test Dockefile base image --------- Co-authored-by: Igor Rodionov <[email protected]>
1 parent 4dd2967 commit e13c36b

11 files changed

+121
-121
lines changed

Dockerfile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
FROM alpine:3.21 AS base
2+
13
##
24
## Base builder image
35
##
4-
FROM alpine:3.17 as builder
6+
FROM base AS builder
57

68
RUN apk --update add --virtual .build-deps build-base automake autoconf libtool git linux-pam-dev zlib-dev openssl-dev wget
79

8-
910
##
1011
## Duo builder image
1112
##
12-
FROM builder as duo-builder
13+
FROM builder AS duo-builder
1314

14-
ARG DUO_VERSION=2.0.0
15+
ARG DUO_VERSION=2.0.4
1516
RUN wget https://dl.duosecurity.com/duo_unix-${DUO_VERSION}.tar.gz && \
1617
mkdir -p src && \
1718
tar -zxf duo_unix-${DUO_VERSION}.tar.gz --strip-components=1 -C src
@@ -23,29 +24,27 @@ RUN cd src && \
2324
make && \
2425
make install
2526

26-
2727
##
2828
## Google Authenticator PAM module builder image
2929
##
30-
FROM builder as google-authenticator-libpam-builder
30+
FROM builder AS google-authenticator-libpam-builder
3131

32-
ARG AUTHENTICATOR_LIBPAM_VERSION=1.09
32+
ARG AUTHENTICATOR_LIBPAM_VERSION=1.11
3333
RUN git clone --branch ${AUTHENTICATOR_LIBPAM_VERSION} --single-branch https://github.com/google/google-authenticator-libpam src
3434

3535
RUN cd src && \
3636
./bootstrap.sh && \
3737
./configure \
38-
--prefix=/dist && \
38+
--prefix=/usr && \
3939
make && \
4040
make install
4141

42-
4342
##
4443
## OpenSSH Portable builder image
4544
##
46-
FROM builder as openssh-portable-builder
45+
FROM builder AS openssh-portable-builder
4746

48-
ARG OPENSSH_VERSION=V_9_3_P1
47+
ARG OPENSSH_VERSION=V_9_9_P2
4948
RUN git clone --branch ${OPENSSH_VERSION} --single-branch https://github.com/openssh/openssh-portable src
5049

5150
COPY patches/ /patches/
@@ -57,24 +56,22 @@ RUN cd src && \
5756
--prefix=/dist/usr \
5857
--sysconfdir=/etc/ssh \
5958
--datadir=/dist/usr/share/openssh \
60-
--libexecdir=/dist/usr/lib/ssh \
59+
--libexecdir=/usr/lib/ssh \
6160
--mandir=/dist/usr/share/man \
6261
--with-pid-dir=/run \
6362
--with-mantype=man \
6463
--with-privsep-path=/var/empty \
6564
--with-privsep-user=sshd \
66-
--with-md5-passwords \
6765
--with-ssl-engine \
6866
--disable-wtmp \
69-
--with-pam=/dist/lib64/security && \
67+
--with-pam=/usr/lib64/security && \
7068
make && \
7169
make install
7270

73-
7471
##
7572
## Bastion image
7673
##
77-
FROM alpine:3.17
74+
FROM base
7875

7976
LABEL maintainer="[email protected]"
8077

@@ -98,10 +95,12 @@ RUN wget https://github.com/cloudposse/sudosh/releases/download/${SUDOSH_VERSION
9895
COPY --from=duo-builder dist/ /
9996

10097
## Install Google Authenticator PAM module
101-
COPY --from=google-authenticator-libpam-builder dist/ /
98+
COPY --from=google-authenticator-libpam-builder /usr /usr
10299

103100
## Install OpenSSH Portable
104101
COPY --from=openssh-portable-builder dist/ /
102+
COPY --from=openssh-portable-builder /usr/lib/ssh /usr/lib/ssh
103+
105104

106105
## System
107106
ENV TIMEZONE="Etc/UTC" \
@@ -128,7 +127,7 @@ ENV ENFORCER_ENABLED="true" \
128127
## Enable Rate Limiting
129128
ENV RATE_LIMIT_ENABLED="true"
130129

131-
## Tolerate 5 consecutive fairues
130+
## Tolerate 5 consecutive failures
132131
ENV RATE_LIMIT_MAX_FAILURES="5"
133132
## Lock accounts out for 300 seconds (5 minutes) after repeated failures
134133
ENV RATE_LIMIT_LOCKOUT_TIME="300"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From 2b340fc84c292db1272ae4b3a7eb85a3de223ddd Mon Sep 17 00:00:00 2001
2+
From: Dominique Martinet <[email protected]>
3+
Date: Tue, 2 Jul 2024 10:00:38 +0900
4+
Subject: [PATCH] disable -fzero-call-used-regs=used on ppc64le
5+
6+
This fails as follow for some files:
7+
packet.c: In function 'ssh_packet_log_type':
8+
packet.c:1158:1: sorry, unimplemented: argument 'used' is not supported for '-fzero-call-used-regs' on this target
9+
1158 | }
10+
| ^
11+
make: *** [Makefile:203: packet.o] Error 1
12+
13+
This had previously been an issue on an older version as well and the
14+
"fix" at the time was to make the detection function more likely to
15+
trigger that behaviour, but that was apparently not enough so just
16+
disable at configure level.
17+
18+
Link: https://issues.guix.gnu.org/68212
19+
---
20+
configure.ac | 12 ++++++++----
21+
1 file changed, 8 insertions(+), 4 deletions(-)
22+
23+
diff --git a/configure.ac b/configure.ac
24+
index 5a865f8e1b07..4f99ad35a3ce 100644
25+
--- a/configure.ac
26+
+++ b/configure.ac
27+
@@ -237,10 +237,14 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
28+
# https://github.com/llvm/llvm-project/issues/59242
29+
# clang 17 has a different bug that causes an ICE when using this
30+
# flag at all (https://bugzilla.mindrot.org/show_bug.cgi?id=3629)
31+
- case "$CLANG_VER" in
32+
- apple-15*) OSSH_CHECK_CFLAG_LINK([-fzero-call-used-regs=used]) ;;
33+
- 17*) ;;
34+
- *) OSSH_CHECK_CFLAG_LINK([-fzero-call-used-regs=used]) ;;
35+
+ case "$host" in
36+
+ "powerpc64le"*) ;; # skip on ppc64le
37+
+ *)
38+
+ case "$CLANG_VER" in
39+
+ apple-15*) OSSH_CHECK_CFLAG_LINK([-fzero-call-used-regs=used]) ;;
40+
+ 17*) ;;
41+
+ *) OSSH_CHECK_CFLAG_LINK([-fzero-call-used-regs=used]) ;;
42+
+ esac
43+
esac
44+
OSSH_CHECK_CFLAG_COMPILE([-ftrivial-auto-var-init=zero])
45+
fi
46+
--
47+
2.39.2
48+

patches/openssh/alpine/fix-utmp.patch

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,3 @@ diff -rNU3 openssh-9.0p1.old/loginrec.c openssh-9.0p1/loginrec.c
2323
# ifdef HAVE_HOST_IN_UTMPX
2424
strncpy(utx->ut_host, li->hostname,
2525
MIN_SIZEOF(utx->ut_host, li->hostname));
26-
@@ -787,7 +787,7 @@
27-
if (li->hostaddr.sa.sa_family == AF_INET)
28-
utx->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr;
29-
# endif
30-
-# ifdef HAVE_ADDR_V6_IN_UTMP
31-
+# ifdef HAVE_ADDR_V6_IN_UTMPX
32-
/* this is just a 128-bit IPv6 address */
33-
if (li->hostaddr.sa.sa_family == AF_INET6) {
34-
sa6 = ((struct sockaddr_in6 *)&li->hostaddr.sa);

patches/openssh/alpine/fix-verify-dns-segfault.patch

Lines changed: 0 additions & 57 deletions
This file was deleted.

patches/openssh/alpine/gss-serv.c.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--- a/ssh_config
2+
+++ b/ssh_config
3+
@@ -17,6 +17,10 @@
4+
# list of available options, their meanings and defaults, please see the
5+
# ssh_config(5) man page.
6+
7+
+# Include configuration snippets before processing this file to allow the
8+
+# snippets to override directives set in this file.
9+
+Include /etc/ssh/ssh_config.d/*.conf
10+
+
11+
# Host *
12+
# ForwardAgent no
13+
# ForwardX11 no
14+
--- a/sshd_config
15+
+++ b/sshd_config
16+
@@ -10,6 +10,10 @@
17+
# possible, but leave them commented. Uncommented options override the
18+
# default value.
19+
20+
+# Include configuration snippets before processing this file to allow the
21+
+# snippets to override directives set in this file.
22+
+Include /etc/ssh/sshd_config.d/*.conf
23+
+
24+
#Port 22
25+
#AddressFamily any
26+
#ListenAddress 0.0.0.0

patches/openssh/alpine/sftp-interactive.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 561a9fd3abf044b5dfafd4852097c1bccc8e98bb Mon Sep 17 00:00:00 2001
2+
From: Dominique Martinet <[email protected]>
3+
Date: Mon, 1 Jul 2024 18:19:12 +0900
4+
Subject: [PATCH] allow using a different sshd-session flavor
5+
6+
---
7+
Makefile.in | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/Makefile.in b/Makefile.in
11+
index e1b77ebc6495..df745d80863b 100644
12+
--- a/Makefile.in
13+
+++ b/Makefile.in
14+
@@ -24,7 +24,7 @@ SSH_PROGRAM=@bindir@/ssh
15+
ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
16+
SFTP_SERVER=$(libexecdir)/sftp-server
17+
SSH_KEYSIGN=$(libexecdir)/ssh-keysign
18+
-SSHD_SESSION=$(libexecdir)/sshd-session
19+
+SSHD_SESSION=$(libexecdir)/sshd-session$(SSHD_SESSION_FLAVOR)
20+
SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
21+
SSH_SK_HELPER=$(libexecdir)/ssh-sk-helper
22+
PRIVSEP_PATH=@PRIVSEP_PATH@
23+
--
24+
2.39.2
25+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
diff --git a/version.h b/version.h
2-
index 69e76e63..9cc63293 100644
2+
index 9bd910a64..6760b7b1b 100644
33
--- a/version.h
44
+++ b/version.h
55
@@ -1,6 +1,6 @@
6-
/* $OpenBSD: version.h,v 1.97 2023/03/15 21:19:57 djm Exp $ */
6+
/* $OpenBSD: version.h,v 1.103 2024/09/19 22:17:44 djm Exp $ */
77

8-
-#define SSH_VERSION "OpenSSH_9.3"
8+
-#define SSH_VERSION "OpenSSH_9.9"
99
+#define SSH_VERSION "SERVER"
1010

11-
#define SSH_PORTABLE "p1"
11+
#define SSH_PORTABLE "p2"
1212
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE

test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.17
1+
FROM alpine:3.21
22

33
RUN apk add \
44
openssh-client \

0 commit comments

Comments
 (0)