lists.arthurdejong.org
RSS feed

[nssldap] Re: Weird behaviour with TLS: pipes, forks, etc

[Date Prev][Date Next] [Thread Prev][Thread Next]

[nssldap] Re: Weird behaviour with TLS: pipes, forks, etc



On Tue, May 15, 2007 at 10:12:38AM -0300, Andreas Hasenack wrote:
> I have a weird behaviour in nss_ldap-255 (didn't test much older
> versions) which only manifests itself when using start_tls or plain ldaps.
> The problem also goes away when using nscd.
> 
> Building a package with rpm just fails without explanation:
> (...)
> Wrote: /home/goetz/rpm/null/RPMS/i586/null-dummy-2-2mdv2008.0.i586.rpm
> Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.2403
> error: Bad exit status from /var/tmp/rpm-tmp.2403 (%clean)

Here is some further debug for when it fails:
Wrote: /home/goetz/rpm/null/RPMS/i586/null-dummy-2-2mdv2008.0.i586.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.43717
nss_ldap: ==> do_atfork_prepare
nss_ldap: <== do_atfork_prepare
nss_ldap: ==> do_atfork_parent
nss_ldap: <== do_atfork_parent
nss_ldap: ==> do_atfork_child
nss_ldap: ==> do_close_no_unbind
error: Bad exit status from /var/tmp/rpm-tmp.43717 (%clean)

Notice it never "leaves" do_close_no_unbind.

The same section for when it works (without start_tls):
Wrote: /home/goetz/rpm/null/RPMS/i586/null-dummy-2-2mdv2008.0.i586.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.419
nss_ldap: ==> do_atfork_prepare
nss_ldap: <== do_atfork_prepare
nss_ldap: ==> do_atfork_parent
nss_ldap: <== do_atfork_parent
nss_ldap: ==> do_atfork_child
nss_ldap: ==> do_close_no_unbind
nss_ldap: <== do_close_no_unbind
nss_ldap: <== do_atfork_child
+ umask 022
+ cd /home/goetz/rpm/null/SPECS/../BUILD
+ rm -rf /var/tmp/null-2-root
+ exit 0

This is the SIGPIPE:
(...)
18640 dup2(9, 3)                        = 3
18640 fcntl64(3, F_SETFD, 0)            = 0
18640 close(9)                          = 0
18640 write(3, "\25\3\1\0 \275\230*k\2\370\25\2661$\265n\265\f/i\300\36"..., 
37) = -1 EPIPE (Broken pipe)
18640 --- SIGPIPE (Broken pipe) @ 0 (0) ---
18640 shutdown(3, 2 /* send and receive */) = -1 ENOTCONN (Transport endpoint 
is not connected)
18640 close(3)                          = 0
18640 close(3)                          = -1 EBADF (Bad file descriptor)

The "3" fd is the connection to the ldap server.