Lines Matching defs:stat

185 	int			numLocDN, stat = 0, count = 0;
218 mit_ldap, mit_nisplus, rv, !fromLDAP, &stat);
221 if (stat == NP_LDAP_RULES_NO_VALUE)
223 stat = 0;
444 int stat;
449 stat = mutex_trylock(&lc->mutex);
450 if (stat == EBUSY && lc->owner != me)
460 int stat;
465 stat = mutex_trylock(&lc->mutex);
467 if (stat == 0) {
473 if (stat != EBUSY || lc->owner != me)
653 int stat;
676 stat = ldap_unbind_s(lc->ld);
677 if (stat == LDAP_SUCCESS) {
687 myself, stat, ldap_err2string(stat));
695 stat = LDAP_UNAVAILABLE;
698 return (stat);
717 int stat, i;
724 stat = ldap_search_st(lc->ld, "", LDAP_SCOPE_BASE, "(objectclass=*)",
726 if (stat != LDAP_SUCCESS) {
729 myself, NIL(lc->sp), ldap_err2string(stat));
730 return (stat);
775 return (stat);
788 int stat;
817 stat = disconnectCon(lc);
818 if (stat != LDAP_SUCCESS)
819 return (stat);
841 stat = lc->status = ldapBind(&lc->ld, lc->who, lc->cred, lc->method,
856 return (stat);
863 findCon(int *stat) {
868 if (stat == 0)
869 stat = &ldapStat;
876 if ((*stat = setupConList(proxyInfo.default_servers,
888 *stat = connectCon(lc, 1);
889 if (*stat != LDAP_SUCCESS) {
890 if (*stat != LDAP_UNAVAILABLE) {
894 ldap_err2string(*stat));
900 *stat = disconnectCon(lc);
901 if (*stat != LDAP_UNAVAILABLE)
918 int stat;
930 stat = disconnectCon(lc);
932 stat = LDAP_SUCCESS;
934 if (stat != LDAP_UNAVAILABLE)
1085 LDAPURLDesc *ludpp, int *stat)
1089 if (stat == 0)
1090 stat = &ldapStat;
1092 *stat = LDAP_SUCCESS;
1098 *stat = connectCon(lc, 1);
1099 if (*stat != LDAP_SUCCESS) {
1118 findReferralCon(char **referralsp, int *stat)
1127 if (stat == 0)
1128 stat = &ldapStat;
1130 *stat = LDAP_SUCCESS;
1164 lc = find_connection_from_list(ldapReferralCon, ludpp, stat);
1166 lc = find_connection_from_list(ldapCon, ludpp, stat);
1198 *stat = LDAP_NO_MEMORY;
1214 lc = find_connection_from_list(ldapReferralCon, ludpp, stat);
1234 findYPCon(__nis_ldap_search_t *ls, int *stat) {
1239 if (stat == 0)
1240 stat = &ldapStat;
1247 if ((*stat = setupConList(proxyInfo.default_servers,
1260 *stat = disconnectCon(lc);
1261 if (*stat != LDAP_UNAVAILABLE)
1291 ldap_err2string(*stat));
1306 *stat = connectCon(lc, 1);
1307 if (*stat != LDAP_SUCCESS) {
1308 if (*stat != LDAP_UNAVAILABLE) {
1312 ldap_err2string(*stat));
1342 * of __nis_rule_value_t elements in the returned array, and '*stat'
1349 int stat, numEntries, numVals, tnv, done, lprEc;
1370 ldapStat = &stat;
1396 stat = ldap_create_sort_keylist(&sortKeyList, SORTKEYLIST);
1397 if (stat != LDAP_SUCCESS) {
1400 myself, ldap_err2string(stat));
1402 *ldapStat = stat;
1406 stat = ldap_create_sort_control(lc->ld, sortKeyList, 1,
1408 if (stat == LDAP_SUCCESS) {
1416 ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
1419 myself, ldap_err2string(stat));
1421 *ldapStat = stat;
1439 *ldapStat = stat;
1465 stat = ldap_create_virtuallist_control(lc->ld,
1467 if (stat != LDAP_SUCCESS) {
1469 &stat);
1472 myself, index, ldap_err2string(stat));
1473 *ldapStat = stat;
1481 stat = ldap_search_ext_s(lc->ld, ls->base,
1489 stat = ldap_create_page_control(lc->ld,
1491 if (stat != LDAP_SUCCESS) {
1495 &stat);
1498 myself, ldap_err2string(stat));
1500 *ldapStat = stat;
1505 stat = ldap_search_ext_s(lc->ld, ls->base,
1510 stat = ldap_search_st(lc->ld, ls->base, ls->scope,
1514 if (stat == LDAP_SUCCESS)
1515 ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
1517 if (stat == LDAP_SERVER_DOWN) {
1519 releaseCon(lc, stat);
1530 if (stat == LDAP_REFERRAL && follow_referral) {
1536 releaseCon(lc, stat);
1537 lc = findReferralCon(referralsp, &stat);
1542 *ldapStat = stat;
1545 stat = LDAP_SUCCESS;
1549 *ldapStat = stat;
1586 *ldapStat, ldap_err2string(stat));
1681 stat = ldap_parse_result(lc->ld, msg, &lprEc, 0, 0, 0,
1683 if (stat != LDAP_SUCCESS) {
1685 &stat);
1688 myself, ldap_err2string(stat));
1689 *ldapStat = stat;
1698 stat = ldap_parse_virtuallist_control(lc->ld,
1701 if (stat == LDAP_SUCCESS) {
1712 stat = ldap_parse_result(lc->ld, msg, &lprEc, 0, 0, 0,
1714 if (stat != LDAP_SUCCESS) {
1716 &stat);
1719 myself, ldap_err2string(stat));
1720 *ldapStat = stat;
1732 stat = ldap_parse_page_control(lc->ld,
1734 if (stat == LDAP_SUCCESS) {
1794 releaseCon(lc, stat);
1798 releaseCon(lc, stat);
2050 int stat;
2066 stat = LDAP_OPERATIONS_ERROR;
2148 stat = LDAP_OPERATIONS_ERROR;
2157 stat = ldap_result((*lc)->ld, msgid, 0, &tv, &msg);
2158 if (stat == 0) {
2159 stat = LDAP_TIMEOUT;
2160 } else if (stat == -1) {
2162 LDAP_OPT_ERROR_NUMBER, &stat);
2164 stat = ldap_parse_result((*lc)->ld, msg, &lderr, NULL,
2166 if (stat == LDAP_SUCCESS)
2167 stat = lderr;
2168 stat = ldap_result2error((*lc)->ld, msg, 0);
2172 &stat);
2175 stat == LDAP_REFERRAL && referralsp != NULL) {
2176 releaseCon(*lc, stat);
2180 *lc = findReferralCon(referralsp, &stat);
2188 LDAP_OPT_ERROR_NUMBER, &stat);
2191 stat = ldap_result((*lc)->ld, msgid, 0, &tv, &msg);
2192 if (stat == 0) {
2193 stat = LDAP_TIMEOUT;
2194 } else if (stat == -1) {
2196 LDAP_OPT_ERROR_NUMBER, &stat);
2198 stat = ldap_parse_result((*lc)->ld, msg, &lderr,
2200 if (stat == LDAP_SUCCESS)
2201 stat = lderr;
2208 return (stat);
2224 int stat, add = 0;
2237 if ((lc = findCon(&stat)) == 0)
2238 return (stat);
2246 &stat);
2250 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2252 if (stat == 0) {
2253 stat = LDAP_TIMEOUT;
2254 } else if (stat == -1) {
2256 &stat);
2258 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2260 if (stat == LDAP_SUCCESS)
2261 stat = lderr;
2264 stat == LDAP_REFERRAL && referralsp != NULL) {
2265 releaseCon(lc, stat);
2269 lc = findReferralCon(referralsp, &stat);
2276 LDAP_OPT_ERROR_NUMBER, &stat);
2279 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2280 if (stat == 0) {
2281 stat = LDAP_TIMEOUT;
2282 } else if (stat == -1) {
2284 LDAP_OPT_ERROR_NUMBER, &stat);
2286 stat = ldap_parse_result(lc->ld, msg, &lderr,
2288 if (stat == LDAP_SUCCESS)
2289 stat = lderr;
2293 if (stat == LDAP_NO_SUCH_OBJECT)
2294 stat = LDAP_SUCCESS;
2297 stat = ldapAdd(dn, rv, objClassAttrs, lc);
2299 if (stat != LDAP_ALREADY_EXISTS)
2301 if ((lc = findCon(&stat)) == 0)
2302 return (stat);
2311 stat = LDAP_PARAM_ERROR;
2318 &stat);
2322 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2323 if (stat == 0) {
2324 stat = LDAP_TIMEOUT;
2325 } else if (stat == -1) {
2327 &stat);
2329 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2331 if (stat == LDAP_SUCCESS)
2332 stat = lderr;
2335 stat == LDAP_REFERRAL && referralsp != NULL) {
2336 releaseCon(lc, stat);
2340 lc = findReferralCon(referralsp, &stat);
2348 LDAP_OPT_ERROR_NUMBER, &stat);
2351 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2352 if (stat == 0) {
2353 stat = LDAP_TIMEOUT;
2354 } else if (stat == -1) {
2356 LDAP_OPT_ERROR_NUMBER, &stat);
2358 stat = ldap_parse_result(lc->ld, msg, &lderr,
2360 if (stat == LDAP_SUCCESS)
2361 stat = lderr;
2372 if (stat == LDAP_OBJECT_CLASS_VIOLATION &&
2376 stat = ldapModifyObjectClass(&lc, dn, rv,
2380 if (stat == LDAP_NO_SUCH_ATTRIBUTE) {
2428 stat = LDAP_NO_MEMORY;
2432 stat = ldapModify(dn, rvt, objClassAttrs, 0);
2433 if (stat != LDAP_SUCCESS &&
2434 stat != LDAP_NO_SUCH_ATTRIBUTE) {
2446 stat = LDAP_SUCCESS;
2450 if (stat == LDAP_NO_SUCH_OBJECT && !addFirst) {
2475 stat = LDAP_SUCCESS;
2478 stat = LDAP_PARAM_ERROR;
2480 stat = ldapAdd(dn, rv, objClassAttrs, lc);
2487 if (stat != LDAP_SUCCESS) {
2494 dn, stat, ldap_err2string(stat));
2497 releaseCon(lc, stat);
2502 return (stat);
2519 int stat;
2534 if ((lc = findCon(&stat)) == 0)
2535 return (stat);
2540 stat = LDAP_OPERATIONS_ERROR;
2546 stat = LDAP_OPERATIONS_ERROR;
2552 (void) ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
2556 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2557 if (stat == 0) {
2558 stat = LDAP_TIMEOUT;
2559 } else if (stat == -1) {
2560 (void) ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
2562 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL, NULL,
2564 if (stat == LDAP_SUCCESS)
2565 stat = lderr;
2567 if (proxyInfo.follow_referral == follow && stat == LDAP_REFERRAL &&
2569 releaseCon(lc, stat);
2573 lc = findReferralCon(referralsp, &stat);
2580 LDAP_OPT_ERROR_NUMBER, &stat);
2583 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2584 if (stat == 0) {
2585 stat = LDAP_TIMEOUT;
2586 } else if (stat == -1) {
2588 &stat);
2590 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2592 if (stat == LDAP_SUCCESS)
2593 stat = lderr;
2598 if (stat != LDAP_SUCCESS) {
2603 dn, stat, ldap_err2string(stat));
2606 releaseCon(lc, stat);
2611 return (stat);
2620 int stat;
2637 if ((lc = findCon(&stat)) == 0)
2638 return (stat);
2660 stat = ldap_rename(lc->ld, oldDn, rdn, NULL, 1, NULL, NULL, &msgid);
2664 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2665 if (stat == 0) {
2666 stat = LDAP_TIMEOUT;
2667 } else if (stat == -1) {
2669 LDAP_OPT_ERROR_NUMBER, &stat);
2671 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2673 if (stat == LDAP_SUCCESS)
2674 stat = lderr;
2675 stat = ldap_result2error(lc->ld, msg, 0);
2679 &stat);
2682 stat == LDAP_REFERRAL && referralsp != NULL) {
2683 releaseCon(lc, stat);
2687 lc = findReferralCon(referralsp, &stat);
2696 LDAP_OPT_ERROR_NUMBER, &stat);
2699 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2700 if (stat == 0) {
2701 stat = LDAP_TIMEOUT;
2702 } else if (stat == -1) {
2704 LDAP_OPT_ERROR_NUMBER, &stat);
2706 stat = ldap_parse_result(lc->ld, msg, &lderr,
2708 if (stat == LDAP_SUCCESS)
2709 stat = lderr;
2720 ldap_err2string(stat));
2724 ldap_err2string(stat));
2727 if (stat == LDAP_NO_SUCH_OBJECT) {
2733 stat = LDAP_SUCCESS;
2736 releaseCon(lc, stat);
2739 return (stat);