Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a custom PAM module that works fine on our i386 development machines but when we try and use it in production on our x64 production servers with vsftpd it fails. The PAM module has been recompiled for x64.

auth.log:

Nov 12 18:29:06 [removed] vsftpd: PAM unable to dlopen(/lib/x86_64-linux-gnu/security/pam_databowl.so): libcrypt.so.1: failed to map segment from shared object: Cannot allocate memory

(n.b We have a huge amount of free memory)

syslog:

Nov 12 18:29:06 [removed]  kernel: [13831373.215161] vsftpd[6955]: segfault at 968 ip 00007fc50dabc8f0 sp 00007fff755e1a30 error 4 in libpthread-2.15.so[7fc50dab6000+18000]

However, using the pamtester tool it works fine:

[removed]:~/pamtester-0.1.2/src$ ./pamtester vsftpd.databowl <removed> authenticate
Password: 
pamtester: successfully authenticated

We are unsure what is causing this error. Does anyone know how to solve this or have any suggestions on how we could further debug it?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Just after I posted this I managed to solve it. It turns out vsftpd limits the amount of virtual memory available using setrlimit(RLIMIT_AS, limit) I guess this was fine on 32bit but it was exhausting this on 64bit. I've not bothered to find an exact limit where this problem occurs but recompiling vsftpd and altering VSFTP_AS_LIMIT in vsftpd's defs.h to triple the limit has removed the problem and the PAM module is working great.

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.