{"action":"created","issue":{"url":"https://api.github.com/repos/quanah/net-ldapapi/issues/6","labels_url":"https://api.github.com/repos/quanah/net-ldapapi/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/quanah/net-ldapapi/issues/6/comments","events_url":"https://api.github.com/repos/quanah/net-ldapapi/issues/6/events","html_url":"https://github.com/quanah/net-ldapapi/issues/6","id":71590160,"number":6,"title":"Asynchronous bind from the Perl OO API calls ldap_sasl_bind with invalid arguments","user":{"login":"phillipod","id":4026932,"avatar_url":"https://avatars.githubusercontent.com/u/4026932?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipod","html_url":"https://github.com/phillipod","followers_url":"https://api.github.com/users/phillipod/followers","following_url":"https://api.github.com/users/phillipod/following{/other_user}","gists_url":"https://api.github.com/users/phillipod/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipod/subscriptions","organizations_url":"https://api.github.com/users/phillipod/orgs","repos_url":"https://api.github.com/users/phillipod/repos","events_url":"https://api.github.com/users/phillipod/events{/privacy}","received_events_url":"https://api.github.com/users/phillipod/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/quanah/net-ldapapi/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"phillipod","id":4026932,"avatar_url":"https://avatars.githubusercontent.com/u/4026932?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipod","html_url":"https://github.com/phillipod","followers_url":"https://api.github.com/users/phillipod/followers","following_url":"https://api.github.com/users/phillipod/following{/other_user}","gists_url":"https://api.github.com/users/phillipod/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipod/subscriptions","organizations_url":"https://api.github.com/users/phillipod/orgs","repos_url":"https://api.github.com/users/phillipod/repos","events_url":"https://api.github.com/users/phillipod/events{/privacy}","received_events_url":"https://api.github.com/users/phillipod/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-04-28T13:25:40Z","updated_at":"2015-04-28T17:29:52Z","closed_at":null,"body":"This code:\r\n\r\n```perl\r\n#!/usr/bin/perl\r\nuse Net::LDAPapi;\r\nmy $ld = Net::LDAPapi->new(\"localhost\");\r\nmy $msg = $ld->bind(-dn => \"cn=admin,dc=example,dc=com\", -password => \"password\");\r\n```\r\n\r\nResults in:\r\n\r\n    # perl bind-test.pl\r\n    Usage: Net::LDAPapi::ldap_sasl_bind(ld, dn, passwd, sctrls, serverctrls, clientctrls, msgidp) at /usr/local/lib/perl/5.14.2/Net/LDAPapi.pm line 469.\r\n\r\n\r\nLooks like the prototype for ldap_sasl_bind() in LDAPapi.xs is wrong - notice the 'sctrls' and 'serverctrls':\r\n\r\n```c\r\nint\r\nldap_sasl_bind(ld, dn, passwd, sctrls, serverctrls, clientctrls, msgidp)\r\n    LDAP *          ld\r\n    LDAP_CHAR *     dn\r\n    LDAP_CHAR *     passwd\r\n    LDAPControl **  serverctrls\r\n    LDAPControl **  clientctrls\r\n    int             msgidp = NO_INIT\r\n    CODE:\r\n    { ... }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/quanah/net-ldapapi/issues/comments/97144267","html_url":"https://github.com/quanah/net-ldapapi/issues/6#issuecomment-97144267","issue_url":"https://api.github.com/repos/quanah/net-ldapapi/issues/6","id":97144267,"user":{"login":"quanah","id":1817107,"avatar_url":"https://avatars.githubusercontent.com/u/1817107?v=3","gravatar_id":"","url":"https://api.github.com/users/quanah","html_url":"https://github.com/quanah","followers_url":"https://api.github.com/users/quanah/followers","following_url":"https://api.github.com/users/quanah/following{/other_user}","gists_url":"https://api.github.com/users/quanah/gists{/gist_id}","starred_url":"https://api.github.com/users/quanah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quanah/subscriptions","organizations_url":"https://api.github.com/users/quanah/orgs","repos_url":"https://api.github.com/users/quanah/repos","events_url":"https://api.github.com/users/quanah/events{/privacy}","received_events_url":"https://api.github.com/users/quanah/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T17:29:52Z","updated_at":"2015-04-28T17:29:52Z","body":"Nice catch.  Looking back, I'm not sure why we hard code this function to doing simple binds (used by the bind function in LDAPapi.pm), rather than letting people pick their mechanism like we do with bind_s.  Oh well. :)"}}