Lines Matching refs:rc

150 		int expire = 0, grace = 0, rc;  in _php_ldap_control_to_array()  local
154 rc = ldap_parse_passwordpolicy_control(ld, ctrl, &expire, &grace, &pperr); in _php_ldap_control_to_array()
155 if ( rc == LDAP_SUCCESS ) { in _php_ldap_control_to_array()
168 int lestimated, rc; in _php_ldap_control_to_array() local
174 rc = ldap_parse_pageresponse_control(ld, ctrl, &lestimated, &lcookie); in _php_ldap_control_to_array()
177 rc = -1; in _php_ldap_control_to_array()
180 if ( rc == LDAP_SUCCESS ) { in _php_ldap_control_to_array()
233 int errcode, rc; in _php_ldap_control_to_array() local
237 rc = ldap_parse_sortresponse_control(ld, ctrl, &errcode, &attribute); in _php_ldap_control_to_array()
239 rc = -1; in _php_ldap_control_to_array()
241 if ( rc == LDAP_SUCCESS ) { in _php_ldap_control_to_array()
253 int target, count, errcode, rc; in _php_ldap_control_to_array() local
258 rc = ldap_parse_vlvresponse_control(ld, ctrl, &target, &count, &context, &errcode); in _php_ldap_control_to_array()
260 rc = -1; in _php_ldap_control_to_array()
262 if ( rc == LDAP_SUCCESS ) { in _php_ldap_control_to_array()
288 int control_iscritical = 0, rc = LDAP_SUCCESS; in _php_ldap_control_from_array() local
318 rc = -1; in _php_ldap_control_from_array()
333 rc = -1; in _php_ldap_control_from_array()
341 rc = ldap_create_page_control_value(ld, pagesize, &cookie, &control_value); in _php_ldap_control_from_array()
342 if (rc != LDAP_SUCCESS) { in _php_ldap_control_from_array()
343 …(NULL, E_WARNING, "Failed to create paged result control value: %s (%d)", ldap_err2string(rc), rc); in _php_ldap_control_from_array()
349 rc = -1; in _php_ldap_control_from_array()
354 rc = -1; in _php_ldap_control_from_array()
363 rc = ldap_create_assertion_control_value(ld, ZSTR_VAL(assert), &control_value); in _php_ldap_control_from_array()
364 if (rc != LDAP_SUCCESS) { in _php_ldap_control_from_array()
365 …docref(NULL, E_WARNING, "Failed to create assert control value: %s (%d)", ldap_err2string(rc), rc); in _php_ldap_control_from_array()
372 rc = -1; in _php_ldap_control_from_array()
377 rc = -1; in _php_ldap_control_from_array()
382 rc = -1; in _php_ldap_control_from_array()
386 rc = -1; in _php_ldap_control_from_array()
389 rc = -1; in _php_ldap_control_from_array()
396 rc = -1; in _php_ldap_control_from_array()
402 rc = -1; in _php_ldap_control_from_array()
415 rc = -1; in _php_ldap_control_from_array()
422 rc = -1; in _php_ldap_control_from_array()
433 rc = -1; in _php_ldap_control_from_array()
439 rc = -1; in _php_ldap_control_from_array()
458 rc = -1; in _php_ldap_control_from_array()
464 rc = -1; in _php_ldap_control_from_array()
471 rc = -1; in _php_ldap_control_from_array()
480 rc = -1; in _php_ldap_control_from_array()
498 rc = ldap_create_sort_control_value(ld, sort_keys, &control_value); in _php_ldap_control_from_array()
499 if (rc != LDAP_SUCCESS) { in _php_ldap_control_from_array()
500 …r_docref(NULL, E_WARNING, "Failed to create sort control value: %s (%d)", ldap_err2string(rc), rc); in _php_ldap_control_from_array()
511 rc = -1; in _php_ldap_control_from_array()
519 rc = -1; in _php_ldap_control_from_array()
527 rc = -1; in _php_ldap_control_from_array()
539 rc = -1; in _php_ldap_control_from_array()
544 rc = -1; in _php_ldap_control_from_array()
552 rc = -1; in _php_ldap_control_from_array()
564 rc = ldap_create_vlv_control_value(ld, &vlvInfo, &control_value); in _php_ldap_control_from_array()
565 if (rc != LDAP_SUCCESS) { in _php_ldap_control_from_array()
566 …or_docref(NULL, E_WARNING, "Failed to create VLV control value: %s (%d)", ldap_err2string(rc), rc); in _php_ldap_control_from_array()
570 rc = -1; in _php_ldap_control_from_array()
574 if (rc == LDAP_SUCCESS) { in _php_ldap_control_from_array()
575 rc = ldap_control_create(ZSTR_VAL(control_oid), control_iscritical, &control_value, 1, ctrl); in _php_ldap_control_from_array()
616 if (rc == LDAP_SUCCESS) { in _php_ldap_control_from_array()
1033 int rc = LDAP_SUCCESS; in PHP_FUNCTION() local
1051 rc = ldap_initialize(&ldap, url); in PHP_FUNCTION()
1066 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
1068 php_error_docref(NULL, E_WARNING, "Could not create session handle: %s", ldap_err2string(rc)); in PHP_FUNCTION()
1131 int rc; in PHP_FUNCTION() local
1161 rc = ldap_sasl_bind_s(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred, in PHP_FUNCTION()
1165 rc = ldap_simple_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw); in PHP_FUNCTION()
1168 if ( rc != LDAP_SUCCESS) { in PHP_FUNCTION()
1169 php_error_docref(NULL, E_WARNING, "Unable to bind to server: %s", ldap_err2string(rc)); in PHP_FUNCTION()
1188 int rc; in PHP_FUNCTION() local
1226 rc = ldap_sasl_bind(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred, in PHP_FUNCTION()
1228 if (rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
1229 php_error_docref(NULL, E_WARNING, "Unable to bind to server: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
1234 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in PHP_FUNCTION()
1235 if (rc == -1) { in PHP_FUNCTION()
1352 size_t rc, dn_len, passwd_len, mech_len, realm_len, authc_id_len, authz_id_len, props_len; in PHP_FUNCTION() local
1369rc = ldap_sasl_interactive_bind_s(ld->link, binddn, ctx->mech, NULL, NULL, LDAP_SASL_QUIET, _php_s… in PHP_FUNCTION()
1370 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
1371 php_error_docref(NULL, E_WARNING, "Unable to bind to server: %s", ldap_err2string(rc)); in PHP_FUNCTION()
2455 int rc, msgid; in php_ldap_do_delete() local
2475 rc = ldap_delete_ext(ld->link, dn, lserverctrls, NULL, &msgid); in php_ldap_do_delete()
2477 rc = ldap_delete_ext_s(ld->link, dn, lserverctrls, NULL); in php_ldap_do_delete()
2479 if (rc != LDAP_SUCCESS) { in php_ldap_do_delete()
2480 php_error_docref(NULL, E_WARNING, "Delete: %s", ldap_err2string(rc)); in php_ldap_do_delete()
2484 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_delete()
2485 if (rc == -1) { in php_ldap_do_delete()
3353 int rc; in PHP_FUNCTION() local
3365 rc = ldap_set_option(ldap, option, ctrls); in PHP_FUNCTION()
3367 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
3390 int rc, lerrcode, myargcount = ZEND_NUM_ARGS(); in PHP_FUNCTION() local
3404 rc = ldap_parse_result(ld->link, ldap_result, &lerrcode, in PHP_FUNCTION()
3410 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
3411 php_error_docref(NULL, E_WARNING, "Unable to parse result: %s", ldap_err2string(rc)); in PHP_FUNCTION()
3465 int rc, myargcount = ZEND_NUM_ARGS(); in PHP_FUNCTION() local
3479 rc = ldap_parse_extended_result(ld->link, ldap_result, in PHP_FUNCTION()
3483 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
3484 …rror_docref(NULL, E_WARNING, "Unable to parse extended operation result: %s", ldap_err2string(rc)); in PHP_FUNCTION()
3632 int rc, msgid; in php_ldap_do_rename() local
3659 rc = ldap_rename(ld->link, dn, newrdn, newparent, deleteoldrdn, lserverctrls, NULL, &msgid); in php_ldap_do_rename()
3661 rc = ldap_rename_s(ld->link, dn, newrdn, newparent, deleteoldrdn, lserverctrls, NULL); in php_ldap_do_rename()
3677 rc = ldap_modrdn2_s(ld->link, dn, newrdn, deleteoldrdn); in php_ldap_do_rename()
3680 if (rc != LDAP_SUCCESS) { in php_ldap_do_rename()
3683 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in php_ldap_do_rename()
3684 if (rc == -1) { in php_ldap_do_rename()
3728 int rc, protocol = LDAP_VERSION3; in PHP_FUNCTION() local
3738 if (((rc = ldap_set_option(ld->link, LDAP_OPT_PROTOCOL_VERSION, &protocol)) != LDAP_SUCCESS) || in PHP_FUNCTION()
3739 ((rc = ldap_start_tls_s(ld->link, NULL, NULL)) != LDAP_SUCCESS) in PHP_FUNCTION()
3741 php_error_docref(NULL, E_WARNING,"Unable to start TLS: %s", ldap_err2string(rc)); in PHP_FUNCTION()
3980 int rc, myargcount = ZEND_NUM_ARGS(); in PHP_FUNCTION() local
4018 rc = ber_flatten2(ber, &ctrl.ldctl_value, 0); in PHP_FUNCTION()
4019 if (rc == LBER_ERROR) { in PHP_FUNCTION()
4032 rc = ldap_set_option(ldap, LDAP_OPT_SERVER_CONTROLS, ctrlsp); in PHP_FUNCTION()
4033 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
4034 …r_docref(NULL, E_WARNING, "Unable to set paged results control: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4072 int rc, lerrcode, myargcount = ZEND_NUM_ARGS(); in PHP_FUNCTION() local
4086 rc = ldap_parse_result(ld->link, in PHP_FUNCTION()
4095 if (rc != LDAP_SUCCESS) { in PHP_FUNCTION()
4096 php_error_docref(NULL, E_WARNING, "Unable to parse result: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4170 int rc, msgid; in PHP_FUNCTION() local
4197 rc = ldap_extended_operation_s(ld->link, ZSTR_VAL(reqoid), in PHP_FUNCTION()
4203 if (rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4204 …LL, E_WARNING, "Extended operation %s failed: %s (%d)", ZSTR_VAL(reqoid), ldap_err2string(rc), rc); in PHP_FUNCTION()
4231 rc = ldap_extended_operation(ld->link, ZSTR_VAL(reqoid), in PHP_FUNCTION()
4236 if (rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4237 …LL, E_WARNING, "Extended operation %s failed: %s (%d)", ZSTR_VAL(reqoid), ldap_err2string(rc), rc); in PHP_FUNCTION()
4242 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in PHP_FUNCTION()
4243 if (rc == -1) { in PHP_FUNCTION()
4273 int rc, myargcount = ZEND_NUM_ARGS(), msgid, err; in PHP_FUNCTION() local
4294 rc = ldap_passwd(ld->link, &luser, in PHP_FUNCTION()
4304 if (rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4305 …cref(NULL, E_WARNING, "Passwd modify extended operation failed: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4310 rc = ldap_result(ld->link, msgid, 1 /* LDAP_MSG_ALL */, NULL, &ldap_res); in PHP_FUNCTION()
4311 if ((rc < 0) || !ldap_res) { in PHP_FUNCTION()
4312 rc = _get_lderrno(ld->link); in PHP_FUNCTION()
4313 …cref(NULL, E_WARNING, "Passwd modify extended operation failed: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4318 rc = ldap_parse_passwd(ld->link, ldap_res, &lgenpasswd); in PHP_FUNCTION()
4319 if( rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4320 …cref(NULL, E_WARNING, "Passwd modify extended operation failed: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4325rc = ldap_parse_result(ld->link, ldap_res, &err, NULL, &errmsg, NULL, (myargcount > 4 ? &lserverct… in PHP_FUNCTION()
4326 if( rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4327 …cref(NULL, E_WARNING, "Passwd modify extended operation failed: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4372 int rc; in PHP_FUNCTION() local
4383 rc = ldap_whoami_s(ld->link, &lauthzid, NULL, NULL); in PHP_FUNCTION()
4384 if (rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4385 …rror_docref(NULL, E_WARNING, "Whoami extended operation failed: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()
4410 int rc; in PHP_FUNCTION() local
4422 rc = ldap_refresh_s(ld->link, &ldn, lttl, &newttl, NULL, NULL); in PHP_FUNCTION()
4423 if (rc != LDAP_SUCCESS ) { in PHP_FUNCTION()
4424 …ror_docref(NULL, E_WARNING, "Refresh extended operation failed: %s (%d)", ldap_err2string(rc), rc); in PHP_FUNCTION()