add pureftpd to fix issue with mariadb >= 10.2
This commit is contained in:
parent
dc3bcf0351
commit
c7242e8a44
8 changed files with 91 additions and 0 deletions
BIN
pureftpd/.Dockerfile.swp
Normal file
BIN
pureftpd/.Dockerfile.swp
Normal file
Binary file not shown.
75
pureftpd/Dockerfile
Normal file
75
pureftpd/Dockerfile
Normal file
|
@ -0,0 +1,75 @@
|
|||
FROM debian/eol:wheezy AS build-stage
|
||||
|
||||
RUN echo "deb http://archive.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list
|
||||
RUN echo "deb-src http://archive.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
software-properties-common
|
||||
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 CBCB082A1BB943DB
|
||||
RUN echo "deb http://mirror2.hs-esslingen.de/mariadb/repo/10.3/debian wheezy main" >> /etc/apt/sources.list
|
||||
RUN echo "deb-src http://mirror2.hs-esslingen.de/mariadb/repo/10.3/debian wheezy main" >> /etc/apt/sources.list
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
build-essential \
|
||||
fakeroot \
|
||||
dpkg-dev \
|
||||
autoconf-archive \
|
||||
libcap2-dev \
|
||||
# libmysqlclient-dev \
|
||||
libmariadb-dev-compat \
|
||||
po-debconf \
|
||||
debhelper \
|
||||
wget \
|
||||
libpam-dev \
|
||||
libldap2-dev \
|
||||
libpq-dev \
|
||||
libssl-dev
|
||||
RUN mkdir pure-ftp-1.0.36-1.1
|
||||
RUN cd pure-ftp-1.0.36-1.1
|
||||
RUN wget http://archive.debian.org/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.36-1.1.dsc
|
||||
RUN wget http://archive.debian.org/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.36.orig.tar.gz
|
||||
RUN wget http://archive.debian.org/debian/pool/main/p/pure-ftpd/pure-ftpd_1.0.36-1.1.diff.gz
|
||||
RUN tar zxvf pure-ftpd_1.0.36.orig.tar.gz
|
||||
RUN mv pure-ftpd-1.0.36.orig/ pure-ftpd-1.0.36
|
||||
RUN mkdir pure-ftpd-1.0.36/debian
|
||||
RUN gunzip pure-ftpd_1.0.36-1.1.diff.gz
|
||||
RUN patch -p0 < pure-ftpd_1.0.36-1.1.diff
|
||||
RUN echo "--- pure-ftpd-1.0.36.orig/src/log_mysql.c 2012-03-16 01:01:37.000000000 +0000" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+++ pure-ftpd-1.0.36/src/log_mysql.c 2021-01-24 20:59:29.749460231 +0000" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "@@ -460,7 +460,25 @@ void pw_mysql_check(AuthResult * const r" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo " my_make_scrambled_password(scrambled_password, password," >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo " strlen(password));" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo " # else" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "- make_scrambled_password(scrambled_password, password);" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+{" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ ulong hash_res[2];" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ size_t len = strlen(password);" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ ulong nr=1345345333L, add=7, nr2=0x12345671L;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ ulong tmp;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ const char *password_end= password + len;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ for (; password < password_end; password++)" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ {" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ if (*password == ' ' || *password == '\t')" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ continue; /* skipp space in password */" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ tmp= (ulong) (unsigned char) *password;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ nr^= (((nr & 63)+add)*tmp)+ (nr << 8);" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ nr2+=(nr2 << 8) ^ nr;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ add+=tmp;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ }" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ hash_res[0]=nr & (((ulong) 1L << 31) -1L); /* Don't use sign bit (str2int) */;" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ hash_res[1]=nr2 & (((ulong) 1L << 31) -1L);" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+ sprintf(scrambled_password,\"%08lx%08lx\",hash_res[0],hash_res[1]);" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "+}" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo " # endif" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo " # endif" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo " #endif" >> self_implemented_make_scrambled_password.diff \
|
||||
&& echo "" >> self_implemented_make_scrambled_password.diff
|
||||
RUN patch -p0 < self_implemented_make_scrambled_password.diff
|
||||
RUN chmod +x pure-ftpd-1.0.36/debian/rules
|
||||
RUN cd pure-ftpd-1.0.36/ \
|
||||
&& dpkg-buildpackage -uc -b
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build-stage /*.deb .
|
||||
|
16
pureftpd/README.md
Normal file
16
pureftpd/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
## Pure-FTPd to run with MariaDB 10.3 on Debian Wheezy
|
||||
|
||||
Rebuild Pure-FTPd due to following error message after using MariaDB 10.3 (should happen also with 10.2)
|
||||
```
|
||||
symbol my_make_scrambled_password, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference
|
||||
```
|
||||
Implementation of make_scrambled_password is taken from MariaDB connectors.
|
||||
|
||||
### Build and get installation files
|
||||
|
||||
Build is done inside Debian Wheezy docker with
|
||||
```
|
||||
DOCKER_BUILDKIT=1 docker build --output out .
|
||||
```
|
||||
After this command the .deb-files are located in out folder.
|
||||
|
BIN
pureftpd/out/pure-ftpd-common_1.0.36-1.1_all.deb
Normal file
BIN
pureftpd/out/pure-ftpd-common_1.0.36-1.1_all.deb
Normal file
Binary file not shown.
BIN
pureftpd/out/pure-ftpd-ldap_1.0.36-1.1_amd64.deb
Normal file
BIN
pureftpd/out/pure-ftpd-ldap_1.0.36-1.1_amd64.deb
Normal file
Binary file not shown.
BIN
pureftpd/out/pure-ftpd-mysql_1.0.36-1.1_amd64.deb
Normal file
BIN
pureftpd/out/pure-ftpd-mysql_1.0.36-1.1_amd64.deb
Normal file
Binary file not shown.
BIN
pureftpd/out/pure-ftpd-postgresql_1.0.36-1.1_amd64.deb
Normal file
BIN
pureftpd/out/pure-ftpd-postgresql_1.0.36-1.1_amd64.deb
Normal file
Binary file not shown.
BIN
pureftpd/out/pure-ftpd_1.0.36-1.1_amd64.deb
Normal file
BIN
pureftpd/out/pure-ftpd_1.0.36-1.1_amd64.deb
Normal file
Binary file not shown.
Loading…
Reference in a new issue