Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Edit 1:

The problem seems to be related to MySQL component. because if I remove every SQL directives from config file, it does work on ftp/ftpes, sftp and ftps


Edit 2:

If I put an existing host not hosting a DB, connection to ftp daemon will hang and finally timeout, while if I put an incorrect db or a non responding host, it will try to run unix auth instaed of mysql auth.


Edit 3:

Sqllog mention we can see that the line Feb 07 15:44:12 mod_sql/4.3[15139036]: entering mysql cmd_open is followed by a new log line after more than one minute Feb 07 15:45:27 :

Feb 07 15:44:11 mod_sql/4.3[15139036]: defaulting to 'mysql' backend
Feb 07 15:44:11 mod_sql/4.3[15139036]: backend module 'mod_sql_mysql/4.0.8'
Feb 07 15:44:11 mod_sql/4.3[15139036]: backend api    'mod_sql_api_v1'
Feb 07 15:44:11 mod_sql/4.3[15139036]: >>> sql_sess_init
Feb 07 15:44:11 mod_sql/4.3[15139036]: entering         mysql cmd_defineconnection
Feb 07 15:44:11 mod_sql/4.3[15139036]:   name: 'default'
Feb 07 15:44:11 mod_sql/4.3[15139036]:   user: 'mysql_poney_user'
Feb 07 15:44:11 mod_sql/4.3[15139036]:   host: 'pingableHostWithoutDB.net'
Feb 07 15:44:11 mod_sql/4.3[15139036]:     db: 'mysql_poney_user'
Feb 07 15:44:11 mod_sql/4.3[15139036]:   port: '15140'
Feb 07 15:44:11 mod_sql/4.3[15139036]:    ttl: '2'
Feb 07 15:44:11 mod_sql/4.3[15139036]: exiting  mysql cmd_defineconnection
Feb 07 15:44:11 mod_sql/4.3[15139036]: connection 'default' successfully established
Feb 07 15:44:11 mod_sql/4.3[15139036]: mod_sql engine     : on
Feb 07 15:44:11 mod_sql/4.3[15139036]: negative_cache     : off
Feb 07 15:44:11 mod_sql/4.3[15139036]: authenticate       : users
Feb 07 15:44:11 mod_sql/4.3[15139036]: usertable          : proftpd_users
Feb 07 15:44:11 mod_sql/4.3[15139036]: userid field       : userid
Feb 07 15:44:11 mod_sql/4.3[15139036]: password field     : passwd
Feb 07 15:44:11 mod_sql/4.3[15139036]: UID field          : uid
Feb 07 15:44:11 mod_sql/4.3[15139036]: GID field          : gid
Feb 07 15:44:11 mod_sql/4.3[15139036]: homedir field      : homedir
Feb 07 15:44:11 mod_sql/4.3[15139036]: shell field        : shell
Feb 07 15:44:11 mod_sql/4.3[15139036]: SQLMinUserUID      : 200
Feb 07 15:44:11 mod_sql/4.3[15139036]: SQLMinUserGID      : 1
Feb 07 15:44:11 mod_sql/4.3[15139036]: <<< sql_sess_init
Feb 07 15:44:12 mod_sql/4.3[15139036]: >>> sql_escapestr
Feb 07 15:44:12 mod_sql/4.3[15139036]: entering         mysql cmd_escapestring
Feb 07 15:44:12 mod_sql/4.3[15139036]: entering         mysql cmd_open
Feb 07 15:45:27 mod_sql/4.3[15139036]: exiting  mysql cmd_open
Feb 07 15:45:27 mod_sql/4.3[15139036]: exiting  mysql cmd_escapestring
Feb 07 15:45:27 mod_sql/4.3[15139036]: unrecoverable backend error
Feb 07 15:45:27 mod_sql/4.3[15139036]: error: '2003'
Feb 07 15:45:27 mod_sql/4.3[15139036]: message: 'Can't connect to MySQL server on 'pingableHostWithoutDB.net' (78)'
Feb 07 15:45:27 mod_sql/4.3[15139036]: entering         mysql cmd_exit
Feb 07 15:45:27 mod_sql/4.3[15139036]: exiting  mysql cmd_exit

Orginal question

I have a proftpd config file that is tested on both proftpd 1.3.4b and proftpd 1.3.4d. Now I want to compile on a new system a AIX 6.1.
I'm using IBM XLc compiler.

here's the library I installed :

rpm -qa
    apr-1.4.6-1
    mkisofs-1.13-4
    pci.df1000fa-1-191A5
    openldap-2.4.23-0.3
    apr-util-ldap-1.5.1-1
    openssl-1.0.1e-2
    bash-3.0-1
    coreutils-5.0-2
    grep-2.5.1-1
    pci.1069B166.0A-050A008a-1
    pci.1069B166.08-0508008a-1
    pci.1069B166.10-0510006d-1
    pci.df1000fa-1-90X13
    pci.df1080f9-1-91x4
    ibm.scsi.disk.10k300-RPQR-1
    ibm.scsi.disk.73lpx15-c51d-1
    ibm.scsi.disk.146z10-s28g-1
    ibm.scsi.disk.146lp-C50K-1
    ses.0018-0018-01
    cdrecord-1.9-7
    pci.1069B166.10-0710000b-1
    screen-3.9.10-2
    expat-2.1.0-1
    zlib-1.2.7-2
    AIX-rpm-6.1.6.15-5
    gettext-0.10.40-8
    libiconv-1.14-2
    apr-util-1.5.1-1
    db4-4.7.25-2
    bzip2-1.0.6-1
    info-4.13a-2
    readline-6.2-4
    pcre-8.32-1
    openssl-devel-1.0.1e-2
    httpd-2.4.3-1
    mpfr-3.1.2-1
    MySQL-devel-5.1.56-1
    libgcc-4.6.1-1
    gcc-4.6.1-1
    libstdc++-4.6.1-1
    libstdc++-devel-4.6.1-1
    gmp-5.1.3-1
    gmp-devel-5.1.3-1
    mpfr-devel-3.1.2-1
    libmpc-1.0.1-2
    libmpc-devel-1.0.1-2
    gcc-cpp-4.6.1-1
    zlib-devel-1.2.7-2

Here's the script I use to compile:

export CONFIG_SHELL=/opt/freeware/bin/bash
export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
export CC=cc
export CFLAGS="-qmaxmem=16384 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"
export CXX=xlC
export CXXFLAGS=$CFLAGS
export CPPFLAGS='-U__STR__'
export F77=xlf
export FFLAGS="-O -I/opt/freeware/include"
export LD=ld
export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib:/opt/freeware/lib/mysql:/opt/freeware/lib/mysql/mysql"
export PATH=/usr/bin:/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/vac/bin:/usr/vacpp/bin:/usr/ccs/bin:/usr/dt/bin:/usr/opt/perl5/bin:/opt/freeware/bin:/opt/freeware/sbin:/usr/local/bin:/usr/lib/instl
export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"
make clean
./configure  '--with-modules=mod_tls:mod_sql:mod_sql_mysql:mod_sql_passwd:mod_sftp:mod_sftp_sql' '--without-getopt' '--enable-openssl' '--with-includes=/home/poney/libmath_header:/home/poney/include_mysql/mysql/' '--with-libraries=/home/poney/libmath_lib:/opt/freeware/lib/mysql/mysql:/opt/freeware/lib/mysql/mysql/libmysqlclient.a' '--prefix=/usr/local/proftpd'
make

The things is it does compile without much further warning. still I do get a warning when make install:

ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-224 WARNING: Duplicate symbol: .memmove
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

My configuration allow FTPS SFTP and FTP, and if I try to connect with ftps it does work until I type the password :

openssl s_client -connect 127.0.0.1:210 -starttls ftp
    CONNECTED(00000003)
    depth=0 /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
    verify error:num=18:self signed certificate
    verify return:1
    depth=0 /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
    verify return:1
    ---
    Certificate chain
     0 s:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
       i:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
    ---
    Server certificate
    -----BEGIN CERTIFICATE-----
    MIICWDCCAcGgAwIBAg[...]8dqCxa3HS6bgg==
    -----END CERTIFICATE-----
    subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
    issuer=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
    ---
    No client certificate CA names sent
    ---
    SSL handshake has read 1264 bytes and written 341 bytes
    ---
    New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
    Server public key is 1024 bit
    Secure Renegotiation IS supported
    Compression: NONE
    Expansion: NONE
    SSL-Session:
        Protocol  : TLSv1
        Cipher    : DHE-RSA-AES256-SHA
        Session-ID: 6F520DFBC97CF172B68A99510AAFA765658324A4478D87ACB481362070A88034
        Session-ID-ctx:
        Master-Key: [...]
        Key-Arg   : None
        Start Time: 1391443369
        Timeout   : 300 (sec)
        Verify return code: 18 (self signed certificate)
    ---
    220 ProFTPD 1.3.4d Server (ftp daemon) [127.0.0.1]
    USER frank
    331 Password required for frank
    PASS $$$$$

And after that nothing, it hangs doing nothing. on the proftpd side the deamon does provide some trace :
see pastbin

I can't read anything usefull here.

I'm pretty sure there's something wrong with the library, but I really don't know what or why it does not want to wrok in the end as it compile without problem.

share|improve this question
    
Don't you need mod_auth_pam? AIX uses PAM –  Elliott Frisch Feb 3 at 17:50
    
Nope, it is already include in the core of profond. –  Kiwy Feb 3 at 20:41

1 Answer 1

up vote 0 down vote accepted

And finally the answer is:
It's not a bug it's a feature

If you try to connect a db that is known in you dns but packets are drop by a firewall, then you fall in the sql timeout of the client (approx 85 sec) and no other authentication works if you have set AUthOrder with mod_sql.c first.

So my compilation option are correct and package version also.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.