Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a pam module to let users authenticate against a PostreSQL database linked to a Django site. It works fine when I let sshd use it, but whenever I try it with vsftpd I get the following lines in /var/log/auth.log:

Jul  7 23:32:31 jeeves vsftpd: PAM unable to dlopen( failed to map segment from shared object: Cannot allocate memory
Jul  7 23:32:31 jeeves vsftpd: PAM adding faulty module:

On the client side, I get an unexpected TLS packet, and the connection fails. When I switch to instead, vsftpd works nicely. The only difference is the pam module.

Since the error message is about allocating memory, I ran ldd on both of the .so files, and pam_django is really dragging along quite a bit more than pam_pwdfile: =>  (0x00007fff90b12000) => /usr/lib/ (0x00007f35b969c000) => /lib/x86_64-linux-gnu/ (0x00007f35b948e000) => /lib/x86_64-linux-gnu/ (0x00007f35b90b2000) => /lib/x86_64-linux-gnu/ (0x00007f35b8db6000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b8baa000) => /lib/x86_64-linux-gnu/ (0x00007f35b87ea000) => /lib/x86_64-linux-gnu/ (0x00007f35b858c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b82be000) => /lib/x86_64-linux-gnu/ (0x00007f35b80b9000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b7e7b000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b7c2c000) => /lib/x86_64-linux-gnu/ (0x00007f35b7a0e000) => /lib/x86_64-linux-gnu/ (0x00007f35b780a000) => /lib/x86_64-linux-gnu/ (0x00007f35b75f3000)
    /lib64/ (0x00007f35b9ae0000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b73ca000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b71c2000) => /lib/x86_64-linux-gnu/ (0x00007f35b6fbe000) => /lib/x86_64-linux-gnu/ (0x00007f35b6da1000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b6b93000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b6978000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b6739000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b647d000) => /lib/x86_64-linux-gnu/ (0x00007f35b61ff000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b5ff7000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b5d71000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b5ad1000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b589c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b5687000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b5476000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b5263000) => /lib/x86_64-linux-gnu/ (0x00007f35b505f000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b4e36000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b4c26000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b49dc000) => /usr/lib/x86_64-linux-gnu/ (0x00007f35b4739000) => /lib/x86_64-linux-gnu/ (0x00007f35b44ff000) =>  (0x00007fffc41ff000) => /lib/x86_64-linux-gnu/ (0x00007ff57bad5000) => /lib/x86_64-linux-gnu/ (0x00007ff57b8c7000) => /lib/x86_64-linux-gnu/ (0x00007ff57b6c2000) => /lib/x86_64-linux-gnu/ (0x00007ff57b303000) => /lib/x86_64-linux-gnu/ (0x00007ff57b0ff000)
    /lib64/ (0x00007ff57bf28000)

So my question then becomes: Is there a limit to how many shared libraries vsftpd can handle from its pam modules? Could it have anything to do with the way vsftpd sandboxes certain tasks? Or is the problem something else entirely?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.