Lines Matching refs:link

74 	LDAP *link;  member
130 ldap_destroy(ld->link); in ldap_link_free()
131 ld->link = NULL; in ldap_link_free()
144 if (ld->link) { in ldap_link_free_obj()
223 if (!ld->link) { \
1038 ld->link = ldap; in PHP_FUNCTION()
1108 ld->link = ldap; in PHP_FUNCTION()
1131 zval *link; in PHP_FUNCTION() local
1137 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|p!p!", &link, ldap_link_ce, &ldap_bind_dn, &ldap_bin… in PHP_FUNCTION()
1141 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1152 rc = ldap_sasl_bind_s(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred, in PHP_FUNCTION()
1156 rc = ldap_simple_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw); in PHP_FUNCTION()
1171 zval *link; in PHP_FUNCTION() local
1181 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|p!p!h!", &link, ldap_link_ce, &ldap_bind_dn, &ldap_b… in PHP_FUNCTION()
1185 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1189 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 4); in PHP_FUNCTION()
1204 rc = ldap_sasl_bind(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred, in PHP_FUNCTION()
1212 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in PHP_FUNCTION()
1320 zval *link; in PHP_FUNCTION() local
1333 &link, ldap_link_ce, in PHP_FUNCTION()
1347 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1350 ctx = _php_sasl_setdefs(ld->link, sasl_mech, sasl_realm, sasl_authc_id, passwd, sasl_authz_id); in PHP_FUNCTION()
1353 ldap_set_option(ld->link, LDAP_OPT_X_SASL_SECPROPS, props); in PHP_FUNCTION()
1356 …rc = ldap_sasl_interactive_bind_s(ld->link, binddn, ctx->mech, NULL, NULL, LDAP_SASL_QUIET, _php_s… in PHP_FUNCTION()
1371 zval *link; in PHP_FUNCTION() local
1374 if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &link, ldap_link_ce) != SUCCESS) { in PHP_FUNCTION()
1378 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1428 zval *link, *attrs = NULL; in php_ldap_do_search() local
1445 Z_PARAM_ZVAL(link) in php_ldap_do_search()
1513 if (Z_TYPE_P(link) == IS_ARRAY) { in php_ldap_do_search()
1516 uint32_t num_links = zend_hash_num_elements(Z_ARRVAL_P(link)); in php_ldap_do_search()
1522 if (!zend_array_is_list(Z_ARRVAL_P(link))) { in php_ldap_do_search()
1579 ZEND_HASH_FOREACH_NUM_KEY_VAL(Z_ARRVAL_P(link), ldap_link_index, link_zv) { in php_ldap_do_search()
1588 if (!current_ld->link) { in php_ldap_do_search()
1630 lserverctrls = php_ldap_controls_from_array(current_ld->link, server_controls_ht, 9); in php_ldap_do_search()
1638 …php_set_opts(current_ld->link, ldap_sizelimit, ldap_timelimit, ldap_deref, &old_ldap_sizelimit, &o… in php_ldap_do_search()
1641 …ldap_search_ext(current_ld->link, ZSTR_VAL(ldap_base_dn), scope, ZSTR_VAL(ldap_filter), ldap_attrs… in php_ldap_do_search()
1652 rcs[i] = ldap_result(lds[i]->link, LDAP_RES_ANY, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_search()
1668 } else if (Z_TYPE_P(link) == IS_OBJECT && instanceof_function(Z_OBJCE_P(link), ldap_link_ce)) { in php_ldap_do_search()
1669 ld = Z_LDAP_LINK_P(link); in php_ldap_do_search()
1670 if (!ld->link) { in php_ldap_do_search()
1689 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 9); in php_ldap_do_search()
1696 …php_set_opts(ld->link, ldap_sizelimit, ldap_timelimit, ldap_deref, &old_ldap_sizelimit, &old_ldap_… in php_ldap_do_search()
1699 …ldap_errno = ldap_search_ext_s(ld->link, ZSTR_VAL(base_dn_str), scope, ZSTR_VAL(filter_str), ldap_… in php_ldap_do_search()
1731 …ment_type_error(1, "must be of type LDAP\\Connection|array, %s given", zend_zval_value_name(link)); in php_ldap_do_search()
1737 …php_set_opts(ld->link, old_ldap_sizelimit, old_ldap_timelimit, old_ldap_deref, &ldap_sizelimit, &l… in php_ldap_do_search()
1794 zval *link, *result; in PHP_FUNCTION() local
1798 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result, ldap_result_ce) != … in PHP_FUNCTION()
1802 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1808 RETURN_LONG(ldap_count_entries(ld->link, ldap_result->result)); in PHP_FUNCTION()
1815 zval *link, *result; in PHP_FUNCTION() local
1821 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result, ldap_result_ce) != … in PHP_FUNCTION()
1825 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1831 if ((entry = ldap_first_entry(ld->link, ldap_result->result)) == NULL) { in PHP_FUNCTION()
1846 zval *link, *result_entry; in PHP_FUNCTION() local
1851 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result_entry, ldap_result_e… in PHP_FUNCTION()
1855 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1860 if ((entry_next = ldap_next_entry(ld->link, resultentry->data)) == NULL) { in PHP_FUNCTION()
1875 zval *link, *result; in PHP_FUNCTION() local
1888 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result, ldap_result_ce) != … in PHP_FUNCTION()
1892 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1898 ldap = ld->link; in PHP_FUNCTION()
1976 zval *link, *result_entry; in PHP_FUNCTION() local
1981 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result_entry, ldap_result_e… in PHP_FUNCTION()
1985 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
1990 if ((attribute = ldap_first_attribute(ld->link, resultentry->data, &resultentry->ber)) == NULL) { in PHP_FUNCTION()
2004 zval *link, *result_entry; in PHP_FUNCTION() local
2009 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result_entry, ldap_result_e… in PHP_FUNCTION()
2013 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2023 if ((attribute = ldap_next_attribute(ld->link, resultentry->data, resultentry->ber)) == NULL) { in PHP_FUNCTION()
2043 zval *link, *result_entry; in PHP_FUNCTION() local
2052 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result_entry, ldap_result_e… in PHP_FUNCTION()
2056 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2064 attribute = ldap_first_attribute(ld->link, resultentry->data, &ber); in PHP_FUNCTION()
2066 ldap_value = ldap_get_values_len(ld->link, resultentry->data, attribute); in PHP_FUNCTION()
2083 attribute = ldap_next_attribute(ld->link, resultentry->data, ber); in PHP_FUNCTION()
2098 zval *link, *result_entry; in PHP_FUNCTION() local
2106 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OOp", &link, ldap_link_ce, &result_entry, ldap_result_… in PHP_FUNCTION()
2110 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2115 if ((ldap_value_len = ldap_get_values_len(ld->link, resultentry->data, attr)) == NULL) { in PHP_FUNCTION()
2116 …LL, E_WARNING, "Cannot get the value(s) of attribute %s", ldap_err2string(_get_lderrno(ld->link))); in PHP_FUNCTION()
2136 zval *link, *result_entry; in PHP_FUNCTION() local
2141 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result_entry, ldap_result_e… in PHP_FUNCTION()
2145 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2150 text = ldap_get_dn(ld->link, resultentry->data); in PHP_FUNCTION()
2220 zval *link; in php_ldap_do_modify() local
2232 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oph/|h!", &link, ldap_link_ce, &dn, &dn_len, &attribut… in php_ldap_do_modify()
2236 ld = Z_LDAP_LINK_P(link); in php_ldap_do_modify()
2336 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 4); in php_ldap_do_modify()
2348 ldap_status_code = ldap_add_ext(ld->link, dn, ldap_mods, lserverctrls, NULL, &msgid); in php_ldap_do_modify()
2350 ldap_status_code = ldap_add_ext_s(ld->link, dn, ldap_mods, lserverctrls, NULL); in php_ldap_do_modify()
2356 ldap_status_code = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_modify()
2370 ldap_status_code = ldap_modify_ext(ld->link, dn, ldap_mods, lserverctrls, NULL, &msgid); in php_ldap_do_modify()
2372 ldap_status_code = ldap_modify_ext_s(ld->link, dn, ldap_mods, lserverctrls, NULL); in php_ldap_do_modify()
2378 ldap_status_code = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_modify()
2477 zval *link; in php_ldap_do_delete() local
2487 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|h!", &link, ldap_link_ce, &dn, &dn_len, &server_con… in php_ldap_do_delete()
2491 ld = Z_LDAP_LINK_P(link); in php_ldap_do_delete()
2495 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 3); in php_ldap_do_delete()
2503 rc = ldap_delete_ext(ld->link, dn, lserverctrls, NULL, &msgid); in php_ldap_do_delete()
2505 rc = ldap_delete_ext_s(ld->link, dn, lserverctrls, NULL); in php_ldap_do_delete()
2512 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_delete()
2553 zval *link; in PHP_FUNCTION() local
2584 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oph/|h!", &link, ldap_link_ce, &dn, &dn_len, &modifica… in PHP_FUNCTION()
2588 ldap_linkdata *ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2701 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 4); in PHP_FUNCTION()
2782 int ldap_status = ldap_modify_ext_s(ld->link, dn, ldap_mods, lserverctrls, NULL); in PHP_FUNCTION()
2827 zval *link; in PHP_FUNCTION() local
2830 if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &link, ldap_link_ce) != SUCCESS) { in PHP_FUNCTION()
2834 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2837 RETURN_LONG(_get_lderrno(ld->link)); in PHP_FUNCTION()
2857 zval *link; in PHP_FUNCTION() local
2861 if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &link, ldap_link_ce) != SUCCESS) { in PHP_FUNCTION()
2865 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2868 ld_errno = _get_lderrno(ld->link); in PHP_FUNCTION()
2877 zval *link; in PHP_FUNCTION() local
2887 &link, ldap_link_ce, in PHP_FUNCTION()
2896 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2900 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 5); in PHP_FUNCTION()
2907 ldap_errno = ldap_compare_ext_s(ld->link, dn, attr, &lvalue, lserverctrls, NULL); in PHP_FUNCTION()
2936 zval *link, *retval; in PHP_FUNCTION() local
2940 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Olz", &link, ldap_link_ce, &option, &retval) != SUCCES… in PHP_FUNCTION()
2944 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
2981 if (ldap_get_option(ld->link, option, &val)) { in PHP_FUNCTION()
2991 if (ldap_get_option(ld->link, LDAP_OPT_NETWORK_TIMEOUT, (void *) &timeout)) { in PHP_FUNCTION()
3008 if (ldap_get_option(ld->link, LDAP_X_OPT_CONNECT_TIMEOUT, &timeout)) { in PHP_FUNCTION()
3019 if (ldap_get_option(ld->link, LDAP_OPT_TIMEOUT, (void *) &timeout)) { in PHP_FUNCTION()
3069 if (ldap_get_option(ld->link, option, &val) || val == NULL || *val == '\0') { in PHP_FUNCTION()
3083 if (ldap_get_option(ld->link, option, &ctrls) || ctrls == NULL) { in PHP_FUNCTION()
3089 _php_ldap_controls_to_array(ld->link, ctrls, retval, 1); in PHP_FUNCTION()
3106 zval *link = NULL, *newval; in PHP_FUNCTION() local
3111 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "O!lz", &link, ldap_link_ce, &option, &newval) != SUCCE… in PHP_FUNCTION()
3115 if (!link) { in PHP_FUNCTION()
3118 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3120 ldap = ld->link; in PHP_FUNCTION()
3306 …zval *link, *result, *errcode, *matcheddn = NULL, *errmsg = NULL, *referrals = NULL, *serverctrls … in PHP_FUNCTION() local
3314 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OOz|zzzz", &link, ldap_link_ce, &result, ldap_result_c… in PHP_FUNCTION()
3318 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3324 rc = ldap_parse_result(ld->link, ldap_result->result, &lerrcode, in PHP_FUNCTION()
3338 _php_ldap_controls_to_array(ld->link, lserverctrls, serverctrls, 0); in PHP_FUNCTION()
3381 zval *link, *result, *retdata = NULL, *retoid = NULL; in PHP_FUNCTION() local
3388 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO|zz", &link, ldap_link_ce, &result, ldap_result_ce, … in PHP_FUNCTION()
3392 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3398 rc = ldap_parse_extended_result(ld->link, ldap_result->result, in PHP_FUNCTION()
3436 zval *link, *result; in PHP_FUNCTION() local
3440 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result, ldap_result_ce) != … in PHP_FUNCTION()
3444 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3450 RETURN_LONG(ldap_count_references(ld->link, ldap_result->result)); in PHP_FUNCTION()
3457 zval *link, *result; in PHP_FUNCTION() local
3463 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result, ldap_result_ce) != … in PHP_FUNCTION()
3467 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3473 if ((entry = ldap_first_reference(ld->link, ldap_result->result)) == NULL) { in PHP_FUNCTION()
3488 zval *link, *result_entry; in PHP_FUNCTION() local
3493 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &link, ldap_link_ce, &result_entry, ldap_result_e… in PHP_FUNCTION()
3497 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3502 if ((entry_next = ldap_next_reference(ld->link, resultentry->data)) == NULL) { in PHP_FUNCTION()
3518 zval *link, *result_entry, *referrals; in PHP_FUNCTION() local
3523 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OOz", &link, ldap_link_ce, &result_entry, ldap_result_… in PHP_FUNCTION()
3527 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3532 …if (ldap_parse_reference(ld->link, resultentry->data, &lreferrals, NULL /* &serverctrls */, 0) != … in PHP_FUNCTION()
3557 zval *link; in php_ldap_do_rename() local
3568 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opppb|h!", &link, ldap_link_ce, &dn, &dn_len, &newrdn,… in php_ldap_do_rename()
3572 ld = Z_LDAP_LINK_P(link); in php_ldap_do_rename()
3581 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 6); in php_ldap_do_rename()
3589 rc = ldap_rename(ld->link, dn, newrdn, newparent, deleteoldrdn, lserverctrls, NULL, &msgid); in php_ldap_do_rename()
3591 rc = ldap_rename_s(ld->link, dn, newrdn, newparent, deleteoldrdn, lserverctrls, NULL); in php_ldap_do_rename()
3607 rc = ldap_modrdn2_s(ld->link, dn, newrdn, deleteoldrdn); in php_ldap_do_rename()
3613 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_rename()
3655 zval *link; in PHP_FUNCTION() local
3659 if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &link, ldap_link_ce) != SUCCESS) { in PHP_FUNCTION()
3663 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3666 if (((rc = ldap_set_option(ld->link, LDAP_OPT_PROTOCOL_VERSION, &protocol)) != LDAP_SUCCESS) || in PHP_FUNCTION()
3667 ((rc = ldap_start_tls_s(ld->link, NULL, NULL)) != LDAP_SUCCESS) in PHP_FUNCTION()
3690 if (!ld->link) { in _ldap_rebind_proc()
3719 zval *link; in PHP_FUNCTION() local
3724 if (zend_parse_parameters(ZEND_NUM_ARGS(), "Of!", &link, ldap_link_ce, &fci, &fcc) == FAILURE) { in PHP_FUNCTION()
3728 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
3736 ldap_set_rebind_proc(ld->link, NULL, NULL); in PHP_FUNCTION()
3743 ldap_set_rebind_proc(ld->link, _ldap_rebind_proc, (void *) link); in PHP_FUNCTION()
3904 zval *link, *retdata = NULL, *retoid = NULL; in php_ldap_exop() local
3922 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "OP|S!h!zz", &link, ldap_link_ce, &reqoid, &reqdata, &s… in php_ldap_exop()
3926 ld = Z_LDAP_LINK_P(link); in php_ldap_exop()
3937 lserverctrls = php_ldap_controls_from_array(ld->link, server_controls_ht, 4); in php_ldap_exop()
3946 rc = ldap_extended_operation_s(ld->link, ZSTR_VAL(reqoid), in php_ldap_exop()
3980 rc = ldap_extended_operation(ld->link, ZSTR_VAL(reqoid), in php_ldap_exop()
3991 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_exop()
4026 zval *link, *serverctrls = NULL; in PHP_FUNCTION() local
4037 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|sssz/", &link, ldap_link_ce, &luser.bv_val, &luser.b… in PHP_FUNCTION()
4041 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
4046 if (ldap_create_passwordpolicy_control(ld->link, &ctrl) == LDAP_SUCCESS) { in PHP_FUNCTION()
4053 rc = ldap_passwd(ld->link, &luser, in PHP_FUNCTION()
4069 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in PHP_FUNCTION()
4071 rc = _get_lderrno(ld->link); in PHP_FUNCTION()
4077 rc = ldap_parse_passwd(ld->link, ldap_res, &lgenpasswd); in PHP_FUNCTION()
4084 …rc = ldap_parse_result(ld->link, ldap_res, &err, NULL, &errmsg, NULL, (serverctrls ? &lserverctrls… in PHP_FUNCTION()
4092 _php_ldap_controls_to_array(ld->link, lserverctrls, serverctrls, 0); in PHP_FUNCTION()
4127 zval *link; in PHP_FUNCTION() local
4132 if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &link, ldap_link_ce) == FAILURE) { in PHP_FUNCTION()
4136 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
4140 rc = ldap_whoami_s(ld->link, &lauthzid, NULL, NULL); in PHP_FUNCTION()
4161 zval *link; in PHP_FUNCTION() local
4169 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Osl", &link, ldap_link_ce, &ldn.bv_val, &ldn.bv_len, &… in PHP_FUNCTION()
4173 ld = Z_LDAP_LINK_P(link); in PHP_FUNCTION()
4178 rc = ldap_refresh_s(ld->link, &ldn, lttl, &newttl, NULL, NULL); in PHP_FUNCTION()