{ "name": "openldap", "version": "2.6.15", "summary": "OpenLDAP 2.6 LTS, the client side: libldap, liblber and the ldap* tools (PHP's ldap extension)", "category": "library", "license": "OLDAP-2.8", "homepage": "https://www.openldap.org/", "source": { "url": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.15.tgz", "sha256": "bc91225dbfc50354033b1303bc91d1a7f6ddd1dc32fac950d79c28fe66d6bca8" }, "watch": {"kind": "index", "url": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/", "regex": "openldap-([0-9]+(?:\\.[0-9]+)+[a-z]?[0-9]*)\\.tgz", "pin": "2.6"}, "deps": [ "openssl" ], "env_packages": [], "static": true, "nss": true, "check": "p=$(free_port) && CHECK_CPPFLAGS=\"-DURL=\\\"ldap://127.0.0.1:$p\\\"\" check_lib ldap 'ldap.h lber.h' 'LDAPURLDesc *u; if (ldap_url_parse(\"ldap://h.example:3890/dc=bvs,dc=test?cn,mail?sub?(uid=x)\", &u) || strcmp(u->lud_host, \"h.example\") || u->lud_port != 3890 || strcmp(u->lud_dn, \"dc=bvs,dc=test\") || u->lud_scope != LDAP_SCOPE_SUBTREE || strcmp(u->lud_filter, \"(uid=x)\") || strcmp(u->lud_attrs[1], \"mail\")) return 1; ldap_free_urldesc(u); LDAPDN dn; if (ldap_str2dn(\"cn=a\\\\,b,ou=x,dc=bvs\", &dn, LDAP_DN_FORMAT_LDAPV3) || !dn[2] || dn[3] || strcmp(dn[0][0]->la_value.bv_val, \"a,b\")) return 2; ldap_dnfree(dn); BerElement *b = ber_alloc_t(LBER_USE_DER); struct berval *bv; ber_int_t i = 0; char *s = NULL; if (!b || ber_printf(b, \"{is}\", (ber_int_t) 42, \"bvs\") < 0 || ber_flatten(b, &bv)) return 3; BerElement *r = ber_init(bv); if (!r || ber_scanf(r, \"{ia}\", &i, &s) == LBER_ERROR || i != 42 || strcmp(s, \"bvs\")) return 4; char *pkg = NULL; if (ldap_get_option(NULL, LDAP_OPT_X_TLS_PACKAGE, &pkg) || !pkg || strcmp(pkg, \"OpenSSL\")) return 5; LDAP *ld; int v = LDAP_VERSION3; struct timeval tv = {3, 0}; if (ldap_initialize(&ld, URL) || ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &v) || ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &tv)) return 6; if (ldap_simple_bind_s(ld, \"cn=bvs\", \"x\") != LDAP_SERVER_DOWN) return 7; ldap_unbind_ext_s(ld, NULL, NULL);' && check_static bin/ldapsearch bin/ldapmodify bin/ldapwhoami && { bin/ldapsearch -x -H \"ldap://127.0.0.1:$p\" -b '' -s base 2>&1 || true; } | has \"Can't contact LDAP server\" && bin/ldapurl -H 'ldap://h.example:3890/dc=bvs??sub' | has -x 'port: 3890' && v=$({ bin/ldapsearch -VV 2>&1 || true; } | sed -n 's/.*ldapsearch \\([0-9][0-9.]*\\) .*/\\1/p' | first) && [ -n \"$v\" ] && echo \"OpenLDAP $v (client): through libldap an LDAP URL and a DN with an escaped comma parsed, BER encoded and decoded, TLS through OpenSSL, a bind to a closed port answered LDAP_SERVER_DOWN; ldapsearch cannot contact that port; ldapurl splits a URL\"" }