Pure-FTPD 1.0.50

This installer seems broken. Or at least on my system.

Bash:
pure-certd.c: In function 'dodaemonize':
pure-certd.c:67:9: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Wunused-result]
         (void) chdir("/");
         ^
pure-certd.c: In function 'updatepidfile':
pure-certd.c:231:18: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
         ftruncate(fd, (off_t) 0);
                  ^
  CC       libpureftpd_a-caps.o
  CC       libpureftpd_a-crypto.o
  CC       libpureftpd_a-daemons.o
  CC       libpureftpd_a-diraliases.o
  CC       libpureftpd_a-dynamic.o
  CC       libpureftpd_a-fakesnprintf.o
  CC       libpureftpd_a-fakechroot.o
  CC       libpureftpd_a-ftp_parser.o
  CC       libpureftpd_a-ftpd.o
  CC       libpureftpd_a-ftpwho-update.o
  CC       libpureftpd_a-ftpwho-read.o
  CC       libpureftpd_a-getloadavg.o
  CC       libpureftpd_a-ipstack.o
  CC       libpureftpd_a-log_unix.o
pure-certd.c: At top level:
cc1: warning: unrecognized command line option "-Wno-unused-command-line-argument" [enabled by default]
  CC       libpureftpd_a-log_mysql.o
  CC       libpureftpd_a-log_pgsql.o
  CC       libpureftpd_a-log_pam.o
  CC       libpureftpd_a-log_ldap.o
  CC       libpureftpd_a-log_puredb.o
  CC       libpureftpd_a-log_extauth.o
  CC       libpureftpd_a-ls.o
  CC       libpureftpd_a-mysnprintf.o
  CC       libpureftpd_a-parser.o
  CC       libpureftpd_a-privsep.o
  CC       libpureftpd_a-quotas.o
  CC       libpureftpd_a-safe_rw.o
  CC       libpureftpd_a-simpleconf.o
  CC       libpureftpd_a-tls_extcert.o
  CC       libpureftpd_a-tls.o
  CC       libpureftpd_a-upload-pipe.o
quotas.c: In function 'quota_update':
quotas.c:120:13: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
             (void) ftruncate(fd, (off_t) 0);
             ^
  CC       libpureftpd_a-utils.o
  CC       ipstack.o
  CC       pure-ftpwho.o
quotas.c: At top level:
cc1: warning: unrecognized command line option "-Wno-unused-command-line-argument" [enabled by default]
ftpd.c: In function 'updatepidfile':
ftpd.c:5155:9: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
         (void) ftruncate(fd, (off_t) 0);
         ^
ftpd.c: In function 'accept_client':
ftpd.c:5249:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
         (void) write(clientfd, line, strlen(line));
         ^
ftpd.c:5265:17: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
                 (void) write(clientfd, line, strlen(line));
                 ^
  CC       pure_mrtginfo-daemons.o
  CC       pure_mrtginfo-fakesnprintf.o
  CC       pure_mrtginfo-pure-mrtginfo.o
  CC       pure_mrtginfo-mysnprintf.o
tls.c: In function 'tls_init_options':
tls.c:329:5: warning: implicit declaration of function 'SSL_CTX_set_num_tickets' [-Wimplicit-function-declaration]
     SSL_CTX_set_num_tickets(tls_ctx, 0);
     ^
  CC       pure-quotacheck.o
  CC       pure-uploadscript.o
  CCLD     pure-statsdecode
  CCLD     pure-pwconvert
pure-uploadscript.c: In function 'dodaemonize':
pure-uploadscript.c:185:9: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Wunused-result]
         (void) chdir("/");
         ^
pure-uploadscript.c: In function 'updatepidfile':
pure-uploadscript.c:432:9: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Wunused-result]
         (void) ftruncate(fd, (off_t) 0);
         ^
  CCLD     ptracetest
  CCLD     pure-authd
  CCLD     pure-certd
  CCLD     pure-pw
  CCLD     pure-mrtginfo
tls.c: At top level:
cc1: warning: unrecognized command line option "-Wno-unused-command-line-argument" [enabled by default]
  CCLD     pure-quotacheck
pure-uploadscript.c: At top level:
cc1: warning: unrecognized command line option "-Wno-unused-command-line-argument" [enabled by default]
  CCLD     pure-uploadscript
  CCLD     pure-ftpwho
ftpd.c: At top level:
cc1: warning: unrecognized command line option "-Wno-unused-command-line-argument" [enabled by default]
  AR       libpureftpd.a
  CCLD     pure-ftpd
libpureftpd.a(libpureftpd_a-tls.o): In function `tls_init_options':
/usr/local/directadmin/custombuild/pure-ftpd-1.0.50/src/tls.c:329: undefined reference to `SSL_CTX_set_num_tickets'
collect2: error: ld returned 1 exit status
make[2]: *** [pure-ftpd] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/pure-ftpd-1.0.50/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/pure-ftpd-1.0.50'
make: *** [all] Error 2
 
Humm, yes, seems to be having an openssl build issue. But strangely, just rebuilding it, seems to compile correctly.

Code:
make clean
./configure
make

Looks like it built correctly, no errors just some warnings. Haven't tried to install it yet, want to make a snapshot of the production machine first before I test it.

Worked fine on Debian 10 and 11. Just not on Debian 9.
 
Built and installed without TLS, works fine otherwise on Debian 9. And commenting out the TLS config lines to not get config errors.

The above configure line did not configure for tls, and is incomplete for how DA builds it. I ended up, just removing the tls option from the default DA configure:

./configure --prefix=/usr --sysconfdir=/etc --with-certfile=/etc/pure-ftpd.pem --with-tls --with-puredb --with-quotas --with-altlog --with-ftpwho --with-ratios --with-welcomemsg --with-uploadscript

Besides no tls, it is working. Thinking this has to do with TLS 1.3 being enabled and a missing check for version compatibility. Have only spent a few minutes looking at the source, keep getting interrupted.
 
Same for me on CentOS Linux release 7.9.2009:

/usr/local/directadmin/custombuild/pure-ftpd-1.0.50/src/tls.c:329: undefined reference to `SSL_CTX_set_num_tickets'
collect2: error: ld returned 1 exit status
make[2]: *** [pure-ftpd] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/pure-ftpd-1.0.50/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/pure-ftpd-1.0.50'
make: *** [all] Error 2
 
Commit on Oct 13, 2021 - Disable session tickets to work around an OpenSSL/TLS1.3 bug


Breaks compile for openssl 1.1.x

Commented out the commit and rebuilt. Re-enabled my config changes and can connect using TLS

Still looking. But I have it back to working on one of my servers, minus that commit.
 
I've downgraded it to 1.0.49 in versions.txt for now, to prevent problems on older systems.
 
I made a comment on the repo commit that is the issue. It's specifically a newer TLS function, only available in 1.1.1 and newer. But for now that's probably the best action to downgrade for now. But it looks like there is an incoming patch.

 
Back
Top