upstream changes
parent
a7f430e617
commit
118a993fbc
4
.SRCINFO
4
.SRCINFO
|
@ -1,7 +1,7 @@
|
|||
pkgbase = lua51-lualdap-git
|
||||
pkgdesc = lua binding to openldap
|
||||
pkgver = master
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://github.com/lualdap/lualdap
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
|
@ -11,9 +11,7 @@ pkgbase = lua51-lualdap-git
|
|||
depends = lua51
|
||||
provides = lua51-lualdap
|
||||
source = git+https://github.com/lualdap/lualdap.git
|
||||
source = allow-uri.patch
|
||||
sha1sums = SKIP
|
||||
sha1sums = a5185d05bf737707937bf3f7177afb33160ff5ec
|
||||
|
||||
pkgname = lua51-lualdap-git
|
||||
|
||||
|
|
9
PKGBUILD
9
PKGBUILD
|
@ -2,7 +2,7 @@
|
|||
|
||||
pkgname=lua51-lualdap-git
|
||||
pkgver=master
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="lua binding to openldap"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://github.com/lualdap/lualdap"
|
||||
|
@ -11,10 +11,8 @@ license=('MIT')
|
|||
provides=('lua51-lualdap')
|
||||
depends=('openldap>=2.1' 'lua51')
|
||||
makedepends=('git')
|
||||
source=("git+https://github.com/lualdap/lualdap.git"
|
||||
"allow-uri.patch")
|
||||
sha1sums=('SKIP'
|
||||
'a5185d05bf737707937bf3f7177afb33160ff5ec')
|
||||
source=("git+https://github.com/lualdap/lualdap.git")
|
||||
sha1sums=('SKIP')
|
||||
_luaBin=lua5.1
|
||||
|
||||
pkgver() {
|
||||
|
@ -24,7 +22,6 @@ pkgver() {
|
|||
|
||||
build() {
|
||||
cd "${srcdir}/lualdap"
|
||||
git apply "${srcdir}/allow-uri.patch"
|
||||
sed -i "s/^LUA *:=.*/LUA := lua$($_luaBin -v 2>&1 | grep -Eo '\<[5-9]\..')/" config
|
||||
make
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
diff --git a/src/lualdap.c b/src/lualdap.c
|
||||
index 9f5f64b..06bdd9e 100644
|
||||
--- a/src/lualdap.c
|
||||
+++ b/src/lualdap.c
|
||||
@@ -1019,9 +1019,15 @@ static int lualdap_open_simple (lua_State *L) {
|
||||
lualdap_setmeta (L, LUALDAP_CONNECTION_METATABLE);
|
||||
conn->version = 0;
|
||||
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300
|
||||
- host_with_schema = malloc(strlen(host) + 8);
|
||||
- strcpy(host_with_schema, "ldap://");
|
||||
- strcat(host_with_schema, host);
|
||||
+ host_with_schema = (char*) host;
|
||||
+ if (strlen(host_with_schema)<8 || strncmp(host_with_schema, "ldap", 4)!=0
|
||||
+ || ( strncmp(host_with_schema+4, "://", 3)!=0
|
||||
+ && strncmp(host_with_schema+5, "://", 3)!=0)
|
||||
+ ) {
|
||||
+ host_with_schema = malloc(strlen(host) + 8);
|
||||
+ strcpy(host_with_schema, "ldap://");
|
||||
+ strcat(host_with_schema, host);
|
||||
+ }
|
||||
err = ldap_initialize(&conn->ld, host_with_schema);
|
||||
free(host_with_schema);
|
||||
host_with_schema = NULL;
|
Loading…
Reference in New Issue