aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-ldap/fix-anonymous-bind.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-12 15:30:01 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-12 17:22:12 +0100
commitefb191b1fd982cc15886898fdab4ff2b2fd09d2b (patch)
treecb060c702fc63fbf55ca7ebaf8f0e234fc87495f /main/lua-ldap/fix-anonymous-bind.patch
parentaebf2df2a6a56187dfcd958b4bae825eaae4c958 (diff)
downloadaports-efb191b1fd982cc15886898fdab4ff2b2fd09d2b.tar.gz
aports-efb191b1fd982cc15886898fdab4ff2b2fd09d2b.tar.bz2
aports-efb191b1fd982cc15886898fdab4ff2b2fd09d2b.tar.xz
main/lua-ldap: fix anonymous bind, add more metadata into patches
Diffstat (limited to 'main/lua-ldap/fix-anonymous-bind.patch')
-rw-r--r--main/lua-ldap/fix-anonymous-bind.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/lua-ldap/fix-anonymous-bind.patch b/main/lua-ldap/fix-anonymous-bind.patch
new file mode 100644
index 0000000000..4c5babe8d0
--- /dev/null
+++ b/main/lua-ldap/fix-anonymous-bind.patch
@@ -0,0 +1,25 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sun, 12 Mar 2017 15:16:19 +0100
+Subject: [PATCH] Fix anonymous bind
+
+Empty string should work for both ancient and the current OpenLDAP API
+(but I've tested only the current).
+
+Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/1
+---
+ src/lualdap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lualdap.c b/src/lualdap.c
+index 5bc1bb9..6063a97 100644
+--- a/src/lualdap.c
++++ b/src/lualdap.c
+@@ -1003,7 +1003,7 @@ static int lualdap_initialize (lua_State *L) {
+ static int lualdap_open_simple (lua_State *L) {
+ ldap_pchar_t host = (ldap_pchar_t) luaL_checkstring (L, 1);
+ ldap_pchar_t who = (ldap_pchar_t) luaL_optstring (L, 2, NULL);
+- const char *password = luaL_optstring (L, 3, NULL);
++ const char *password = luaL_optstring (L, 3, "");
+ int use_tls = lua_toboolean (L, 4);
+ conn_data *conn = (conn_data *)lua_newuserdata (L, sizeof(conn_data));
+ #if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300