Isn't getpass() deprecated and removed from POSIX?
p.
yuri.pankov@gmail.com wrote:
Full_Name: Yuri Pankov Version: 2.4.15 OS: FreeBSD URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (85.175.25.104)
Running ldap{add,modify} with -W switch leads to following coredump (introduced in rev.1.121 of clients/tools/common.c):
ldapadd -x -D "cn=root,dc=darklight,dc=homeunix,dc=org" -W -f root.ldif
Enter LDAP Password: adding new entry "dc=darklight,dc=homeunix,dc=org"
Assertion failed: (arena != NULL), function arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 3843. Abort (core dumped)
We shouldn't try to free() result returned by getpass():
--- ./clients/tools/common.c.orig 2009-03-11 19:24:18.523596600 +0300 +++ ./clients/tools/common.c 2009-03-11 19:24:52.443459786 +0300 @@ -255,9 +255,11 @@ ber_memfree( binddn ); }
+#ifndef HAVE_GETPASS if ( passwd.bv_val != NULL ) { ber_memfree( passwd.bv_val ); } +#endif }
void
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it ----------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Fax: +39 0382 476497 Email: ando@sys-net.it -----------------------------------