[PATCH] libads: abstract out SASL wrapping code

Alexander Bokovoy ab at samba.org
Mon May 15 13:27:43 UTC 2017


On pe, 12 touko 2017, Jeremy Allison wrote:
> On Fri, May 12, 2017 at 02:33:01PM -0700, Jeremy Allison via samba-technical wrote:
> > On Fri, May 05, 2017 at 08:24:43PM +0300, Alexander Bokovoy via samba-technical wrote:
> > > Hi,
> > > 
> > > this is a preparatory patch to allow libads to user LDAP management via
> > > smbldap instead of doing that directly. The patch has no functional
> > > changes yet but untangles SASL code from direct use of ADS structure
> > > (apart from initialization).
> > > 
> > > It compiles but I haven't tested yet. Please review.
> > 
> > LGTM Alexander, simple wrap replace. Let's see if it goes
> > through autobuild :-).
> 
> Fails with:
> 
> Join failed
> SOCKET_WRAPPER_DEFAULT_IFACE="29" RESOLV_WRAPPER_HOSTS="/space/jra/src/samba/git/master/st/dns_host_file" KRB5_CONFIG="/space/jra/src/samba/git/master/st/ad_member/lib/krb5.conf" SELFTEST_WINBINDD_SOCKET_DIR="/space/jra/src/samba/git/master/st/ad_member/winbindd" ./bin/net join -s /space/jra/src/samba/git/master/st/ad_member/lib/server.conf -UAdministrator%locDCpass1 at /space/jra/src/samba/git/master/selftest/target/Samba3.pm line 469.
> failed to start up environment 'ad_member' at /space/jra/src/samba/git/master/selftest/target/Samba.pm line 49.
> samba can't start up known environment 'ad_member' at /space/jra/src/samba/git/master/selftest/selftest.pl line 929.
> [47(651)/2098 at 15m27s, 1 errors] samba.tests.pam_winbind(ad_member)
> ERROR: Testsuite[samba.tests.pam_winbind(ad_member)]
> REASON: unable to set up environment ad_member - exiting
> 
> Sorry Alexander, I'll re-review once you've got it
> passing local make test !
Thanks for trying. :)

I'm able to reproduce it locally. However, it seems that this change
uncovered some bug in source4 ldap server code. After looping in LDAP
server code it times out and says this:

smbsrv_recv
s4_tevent: Destroying timer event 0x560a5ab22780 "tevent_req_timedout"
Terminating connection deferred - 'NT_STATUS_END_OF_FILE'
Terminating connection - 'NT_STATUS_END_OF_FILE'
s4_tevent: Schedule immediate event "tevent_req_trigger": 0x560a5a96c1a0
ipv4:127.0.0.29:13517 closed connection to service IPC$
s4_tevent: Added timed event "tevent_req_timedout": 0x560a5adfbb00
s4_tevent: Run immediate event "tevent_req_trigger": 0x560a5a96c1a0
s4_tevent: Destroying timer event 0x560a5adfbb00 "tevent_req_timedout"
s4_tevent: Schedule immediate event "tevent_req_trigger": 0x560a5a96c1a0
s4_tevent: Added timed event "tevent_req_timedout": 0x560a5adfbb00
s4_tevent: Run immediate event "tevent_req_trigger": 0x560a5a96c1a0
s4_tevent: Destroying timer event 0x560a5adfbb00 "tevent_req_timedout"
Terminating connection - 'ldapsrv_call_loop: tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNECTED'
msg_dgm_ref_destructor: refs=0x560a59f42250
Join failed
SOCKET_WRAPPER_DEFAULT_IFACE="29" RESOLV_WRAPPER_HOSTS="/home/abokovoy/src/samba/st/dns_host_file" KRB5_CONFIG="/home/abokovoy/src/samba/st/ad_member/lib/krb5.conf" SELFTEST_WINBINDD_SOCKET_DIR="/home/abokovoy/src/samba/st/ad_member/winbindd" ./bin/net '-d50 ldb:0' join -s /home/abokovoy/src/samba/st/ad_member/lib/server.conf -UAdministrator%locDCpass1 at /home/abokovoy/src/samba/selftest/target/Samba3.pm line 470.
failed to start up environment 'ad_member' at /home/abokovoy/src/samba/selftest/target/Samba.pm line 49.
samba can't start up known environment 'ad_member' at /home/abokovoy/src/samba/selftest/selftest.pl line 929.
[1(0)/1 at 0s] samba.tests.pam_winbind(ad_member)
ERROR: Testsuite[samba.tests.pam_winbind(ad_member)]
REASON: unable to set up environment ad_member - exiting


standard_terminate: reason[NT_STATUS_END_OF_FILE]
msg_dgm_ref_destructor: refs=0x560a59f42250
msg_dgm_ref_destructor: refs=(nil)
msg_dgm_ref_destructor: refs=0x560a5a559300
single_terminate: reason[ldapsrv_call_loop: tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNEC´┐Ż]
samba: EOF on stdin - PID 3454 terminating
msg_dgm_ref_destructor: refs=(nil)
-------------------------------------------------------------------------------------------------------------

Notice NT_STATUS_CONNECTION_DISCONNECT message garbled?

I'm still trying to understand what broke -- on client side we seem
never get back (my debug statements never get printed) after successful
SASL GSS-SPNEGO bind.


-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list