Summary: | ASTERISK-11988: [patch] Will not bind anonymously | ||
Reporter: | Gavin Henry (suretec) | Labels: | |
Date Opened: | 2008-05-07 10:31:27 | Date Closed: | 2008-05-27 08:25:47 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_config_ldap |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) res_config_ldap.c.patch | |
Description: | When settings are such: [_general] ; ; Specify one of either host and port OR url. URL is preferred, as you can ; use more options. ;host=192.168.1.1 ; LDAP host ;port=389 url=ldap://127.0.0.1:389 protocol=3 ; Version of the LDAP protocol to use; default is 3. basedn=dc=example,dc=com An anon bind fails, and OpenLDAP logs show: May 7 16:34:23 localhost slapd[14694]: slapd starting May 7 16:34:29 localhost slapd[14694]: conn=0 fd=12 ACCEPT from IP=127.0.0.1:36139 (IP=0.0.0.0:389) May 7 16:34:29 localhost slapd[14694]: bind: ber_scanf failed May 7 16:34:29 localhost slapd[14694]: conn=0 op=0 DISCONNECT tag=120 err=2 text=decoding error May 7 16:34:29 localhost slapd[14694]: conn=0 fd=12 closed (operations error) ****** ADDITIONAL INFORMATION ****** Some error here with connection. | ||
Comments: | By: Gavin Henry (suretec) 2008-05-07 10:31:59 It works with a userdn and password. By: Gavin Henry (suretec) 2008-05-07 10:36:19 With slapd -d -1 on: connection_get(12) connection_get(12): got connid=0 connection_read(12): checking for input on id=0 ber_get_next ldap_read: want=8, got=8 0000: 30 0a 02 01 01 60 05 02 0....`.. ldap_read: want=4, got=4 0000: 01 03 04 00 .... ber_get_next: tag 0x30 len 10 contents: ber_dump: buf=0x97d7828 ptr=0x97d7828 end=0x97d7832 len=10 0000: 02 01 01 60 05 02 01 03 04 00 ...`...... ber_get_next ldap_read: want=8 error=Resource temporarily unavailable do_bind ber_scanf fmt ({imt) ber: ber_dump: buf=0x97d7828 ptr=0x97d782b end=0x97d7832 len=7 0000: 60 05 02 01 03 04 00 `...... bind: ber_scanf failed send_ldap_disconnect 2:decoding error send_ldap_response: msgid=0 tag=120 err=2 ber_flush: 52 bytes to sd 12 0000: 30 32 02 01 00 78 2d 0a 01 02 04 00 04 0e 64 65 02...x-.......de 0010: 63 6f 64 69 6e 67 20 65 72 72 6f 72 8a 16 31 2e coding error..1. 0020: 33 2e 36 2e 31 2e 34 2e 31 2e 31 34 36 36 2e 32 3.6.1.4.1.1466.2 0030: 30 30 33 36 0036 ldap_write: want=52, written=52 0000: 30 32 02 01 00 78 2d 0a 01 02 04 00 04 0e 64 65 02...x-.......de 0010: 63 6f 64 69 6e 67 20 65 72 72 6f 72 8a 16 31 2e coding error..1. 0020: 33 2e 36 2e 31 2e 34 2e 31 2e 31 34 36 36 2e 32 3.6.1.4.1.1466.2 0030: 30 30 33 36 0036 conn=0 op=0 DISCONNECT tag=120 err=2 text=decoding error connection_closing: readying conn=0 sd=12 for close connection_resched: attempting closing conn=0 sd=12 connection_close: conn=0 sd=12 daemon: removing 12 conn=0 fd=12 closed (operations error) daemon: activity on 1 descriptor daemon: activity on: daemon: epoll: listen=7 active_threads=0 tvp=zero daemon: epoll: listen=8 active_threads=0 tvp=zero By: Gavin Henry (suretec) 2008-05-07 16:25:50 I'm switching this build to svn for now, so I can really test res_ldap. Will keep you posted. By: Gavin Henry (suretec) 2008-05-27 03:20:41 Patch to fix anon bind bug and added author line. Thanks. By: Digium Subversion (svnbot) 2008-05-27 08:23:59 Repository: asterisk Revision: 118302 U trunk/res/res_config_ldap.c ------------------------------------------------------------------------ r118302 | tilghman | 2008-05-27 08:23:52 -0500 (Tue, 27 May 2008) | 6 lines When binding anonymously, credentials are still needed. (closes issue ASTERISK-11988) Reported by: suretec Patches: res_config_ldap.c.patch uploaded by suretec (license 70) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=118302 By: Digium Subversion (svnbot) 2008-05-27 08:24:48 Repository: asterisk Revision: 118303 _U branches/1.6.0/ U branches/1.6.0/res/res_config_ldap.c ------------------------------------------------------------------------ r118303 | tilghman | 2008-05-27 08:24:46 -0500 (Tue, 27 May 2008) | 14 lines Merged revisions 118302 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r118302 | tilghman | 2008-05-27 08:30:10 -0500 (Tue, 27 May 2008) | 6 lines When binding anonymously, credentials are still needed. (closes issue ASTERISK-11988) Reported by: suretec Patches: res_config_ldap.c.patch uploaded by suretec (license 70) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=118303 By: Tilghman Lesher (tilghman) 2008-05-27 08:25:47 One note: adding a 2 line fix does not make you an author. |