Lines Matching refs:stat

184 	int			numLocDN, stat = 0, count = 0;
217 mit_ldap, mit_nis, rv, !fromLDAP, &stat);
220 if (stat == NP_LDAP_RULES_NO_VALUE)
222 stat = 0;
443 int stat;
448 stat = mutex_trylock(&lc->mutex);
449 if (stat == EBUSY && lc->owner != me)
459 int stat;
464 stat = mutex_trylock(&lc->mutex);
466 if (stat == 0) {
472 if (stat != EBUSY || lc->owner != me)
654 int stat;
677 stat = ldap_unbind_s(lc->ld);
678 if (stat == LDAP_SUCCESS) {
688 myself, stat, ldap_err2string(stat));
696 stat = LDAP_UNAVAILABLE;
699 return (stat);
718 int stat, i;
725 stat = ldap_search_st(lc->ld, "", LDAP_SCOPE_BASE, "(objectclass=*)",
727 if (stat != LDAP_SUCCESS) {
730 myself, NIL(lc->sp), ldap_err2string(stat));
731 return (stat);
776 return (stat);
789 int stat;
818 stat = disconnectCon(lc);
819 if (stat != LDAP_SUCCESS)
820 return (stat);
842 stat = lc->status = ldapBind(&lc->ld, lc->who, lc->cred, lc->method,
857 return (stat);
864 findCon(int *stat) {
869 if (stat == 0)
870 stat = &ldapStat;
877 if ((*stat = setupConList(proxyInfo.default_servers,
889 *stat = connectCon(lc, 1);
890 if (*stat != LDAP_SUCCESS) {
891 if (*stat != LDAP_UNAVAILABLE) {
895 ldap_err2string(*stat));
901 *stat = disconnectCon(lc);
902 if (*stat != LDAP_UNAVAILABLE)
919 int stat;
931 stat = disconnectCon(lc);
933 stat = LDAP_SUCCESS;
935 if (stat != LDAP_UNAVAILABLE)
1086 LDAPURLDesc *ludpp, int *stat)
1090 if (stat == 0)
1091 stat = &ldapStat;
1093 *stat = LDAP_SUCCESS;
1099 *stat = connectCon(lc, 1);
1100 if (*stat != LDAP_SUCCESS) {
1119 findReferralCon(char **referralsp, int *stat)
1128 if (stat == 0)
1129 stat = &ldapStat;
1131 *stat = LDAP_SUCCESS;
1165 lc = find_connection_from_list(ldapReferralCon, ludpp, stat);
1167 lc = find_connection_from_list(ldapCon, ludpp, stat);
1199 *stat = LDAP_NO_MEMORY;
1215 lc = find_connection_from_list(ldapReferralCon, ludpp, stat);
1235 findYPCon(__nis_ldap_search_t *ls, int *stat) {
1240 if (stat == 0)
1241 stat = &ldapStat;
1248 if ((*stat = setupConList(proxyInfo.default_servers,
1261 *stat = disconnectCon(lc);
1262 if (*stat != LDAP_UNAVAILABLE)
1292 ldap_err2string(*stat));
1307 *stat = connectCon(lc, 1);
1308 if (*stat != LDAP_SUCCESS) {
1309 if (*stat != LDAP_UNAVAILABLE) {
1313 ldap_err2string(*stat));
1343 * of __nis_rule_value_t elements in the returned array, and '*stat'
1350 int stat, numEntries, numVals, tnv, done, lprEc;
1371 ldapStat = &stat;
1397 stat = ldap_create_sort_keylist(&sortKeyList, SORTKEYLIST);
1398 if (stat != LDAP_SUCCESS) {
1401 myself, ldap_err2string(stat));
1403 *ldapStat = stat;
1407 stat = ldap_create_sort_control(lc->ld, sortKeyList, 1,
1409 if (stat == LDAP_SUCCESS) {
1417 ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
1420 myself, ldap_err2string(stat));
1422 *ldapStat = stat;
1440 *ldapStat = stat;
1466 stat = ldap_create_virtuallist_control(lc->ld,
1468 if (stat != LDAP_SUCCESS) {
1470 &stat);
1473 myself, index, ldap_err2string(stat));
1474 *ldapStat = stat;
1482 stat = ldap_search_ext_s(lc->ld, ls->base,
1490 stat = ldap_create_page_control(lc->ld,
1492 if (stat != LDAP_SUCCESS) {
1496 &stat);
1499 myself, ldap_err2string(stat));
1501 *ldapStat = stat;
1506 stat = ldap_search_ext_s(lc->ld, ls->base,
1511 stat = ldap_search_st(lc->ld, ls->base, ls->scope,
1515 if (stat == LDAP_SUCCESS)
1516 ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
1518 if (stat == LDAP_SERVER_DOWN) {
1520 releaseCon(lc, stat);
1531 if (stat == LDAP_REFERRAL && follow_referral) {
1537 releaseCon(lc, stat);
1538 lc = findReferralCon(referralsp, &stat);
1543 *ldapStat = stat;
1546 stat = LDAP_SUCCESS;
1550 *ldapStat = stat;
1587 *ldapStat, ldap_err2string(stat));
1696 stat = ldap_parse_result(lc->ld, msg, &lprEc, 0, 0, 0,
1698 if (stat != LDAP_SUCCESS) {
1700 &stat);
1703 myself, ldap_err2string(stat));
1704 *ldapStat = stat;
1713 stat = ldap_parse_virtuallist_control(lc->ld,
1716 if (stat == LDAP_SUCCESS) {
1727 stat = ldap_parse_result(lc->ld, msg, &lprEc, 0, 0, 0,
1729 if (stat != LDAP_SUCCESS) {
1731 &stat);
1734 myself, ldap_err2string(stat));
1735 *ldapStat = stat;
1747 stat = ldap_parse_page_control(lc->ld,
1749 if (stat == LDAP_SUCCESS) {
1809 releaseCon(lc, stat);
1813 releaseCon(lc, stat);
2065 int stat;
2081 stat = LDAP_OPERATIONS_ERROR;
2163 stat = LDAP_OPERATIONS_ERROR;
2172 stat = ldap_result((*lc)->ld, msgid, 0, &tv, &msg);
2173 if (stat == 0) {
2174 stat = LDAP_TIMEOUT;
2175 } else if (stat == -1) {
2177 LDAP_OPT_ERROR_NUMBER, &stat);
2179 stat = ldap_parse_result((*lc)->ld, msg, &lderr, NULL,
2181 if (stat == LDAP_SUCCESS)
2182 stat = lderr;
2183 stat = ldap_result2error((*lc)->ld, msg, 0);
2187 &stat);
2190 stat == LDAP_REFERRAL && referralsp != NULL) {
2191 releaseCon(*lc, stat);
2195 *lc = findReferralCon(referralsp, &stat);
2203 LDAP_OPT_ERROR_NUMBER, &stat);
2206 stat = ldap_result((*lc)->ld, msgid, 0, &tv, &msg);
2207 if (stat == 0) {
2208 stat = LDAP_TIMEOUT;
2209 } else if (stat == -1) {
2211 LDAP_OPT_ERROR_NUMBER, &stat);
2213 stat = ldap_parse_result((*lc)->ld, msg, &lderr,
2215 if (stat == LDAP_SUCCESS)
2216 stat = lderr;
2223 return (stat);
2239 int stat, add = 0;
2253 if ((lc = findCon(&stat)) == 0)
2254 return (stat);
2262 &stat);
2266 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2268 if (stat == 0) {
2269 stat = LDAP_TIMEOUT;
2270 } else if (stat == -1) {
2272 &stat);
2274 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2276 if (stat == LDAP_SUCCESS)
2277 stat = lderr;
2280 stat == LDAP_REFERRAL && referralsp != NULL) {
2281 releaseCon(lc, stat);
2285 lc = findReferralCon(referralsp, &stat);
2292 LDAP_OPT_ERROR_NUMBER, &stat);
2295 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2296 if (stat == 0) {
2297 stat = LDAP_TIMEOUT;
2298 } else if (stat == -1) {
2300 LDAP_OPT_ERROR_NUMBER, &stat);
2302 stat = ldap_parse_result(lc->ld, msg, &lderr,
2304 if (stat == LDAP_SUCCESS)
2305 stat = lderr;
2309 if (stat == LDAP_NO_SUCH_OBJECT)
2310 stat = LDAP_SUCCESS;
2313 stat = ldapAdd(dn, rv, objClassAttrs, lc);
2315 if (stat != LDAP_ALREADY_EXISTS)
2317 if ((lc = findCon(&stat)) == 0)
2318 return (stat);
2327 stat = LDAP_PARAM_ERROR;
2334 &stat);
2338 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2339 if (stat == 0) {
2340 stat = LDAP_TIMEOUT;
2341 } else if (stat == -1) {
2343 &stat);
2345 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2347 if (stat == LDAP_SUCCESS)
2348 stat = lderr;
2351 stat == LDAP_REFERRAL && referralsp != NULL) {
2352 releaseCon(lc, stat);
2356 lc = findReferralCon(referralsp, &stat);
2364 LDAP_OPT_ERROR_NUMBER, &stat);
2367 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2368 if (stat == 0) {
2369 stat = LDAP_TIMEOUT;
2370 } else if (stat == -1) {
2372 LDAP_OPT_ERROR_NUMBER, &stat);
2374 stat = ldap_parse_result(lc->ld, msg, &lderr,
2376 if (stat == LDAP_SUCCESS)
2377 stat = lderr;
2388 if (stat == LDAP_OBJECT_CLASS_VIOLATION &&
2392 stat = ldapModifyObjectClass(&lc, dn, rv,
2396 if (stat == LDAP_NO_SUCH_ATTRIBUTE) {
2444 stat = LDAP_NO_MEMORY;
2448 stat = ldapModify(dn, rvt, objClassAttrs, 0);
2449 if (stat != LDAP_SUCCESS &&
2450 stat != LDAP_NO_SUCH_ATTRIBUTE) {
2462 stat = LDAP_SUCCESS;
2466 if (stat == LDAP_NO_SUCH_OBJECT && !addFirst) {
2491 stat = LDAP_SUCCESS;
2494 stat = LDAP_PARAM_ERROR;
2496 stat = ldapAdd(dn, rv, objClassAttrs, lc);
2503 if (stat != LDAP_SUCCESS) {
2510 dn, stat, ldap_err2string(stat));
2513 releaseCon(lc, stat);
2518 return (stat);
2535 int stat;
2550 if ((lc = findCon(&stat)) == 0)
2551 return (stat);
2556 stat = LDAP_OPERATIONS_ERROR;
2562 stat = LDAP_OPERATIONS_ERROR;
2568 (void) ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
2572 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2573 if (stat == 0) {
2574 stat = LDAP_TIMEOUT;
2575 } else if (stat == -1) {
2576 (void) ldap_get_option(lc->ld, LDAP_OPT_ERROR_NUMBER, &stat);
2578 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL, NULL,
2580 if (stat == LDAP_SUCCESS)
2581 stat = lderr;
2583 if (proxyInfo.follow_referral == follow && stat == LDAP_REFERRAL &&
2585 releaseCon(lc, stat);
2589 lc = findReferralCon(referralsp, &stat);
2596 LDAP_OPT_ERROR_NUMBER, &stat);
2599 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2600 if (stat == 0) {
2601 stat = LDAP_TIMEOUT;
2602 } else if (stat == -1) {
2604 &stat);
2606 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2608 if (stat == LDAP_SUCCESS)
2609 stat = lderr;
2614 if (stat != LDAP_SUCCESS) {
2619 dn, stat, ldap_err2string(stat));
2622 releaseCon(lc, stat);
2627 return (stat);
2636 int stat;
2653 if ((lc = findCon(&stat)) == 0)
2654 return (stat);
2676 stat = ldap_rename(lc->ld, oldDn, rdn, NULL, 1, NULL, NULL, &msgid);
2680 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2681 if (stat == 0) {
2682 stat = LDAP_TIMEOUT;
2683 } else if (stat == -1) {
2685 LDAP_OPT_ERROR_NUMBER, &stat);
2687 stat = ldap_parse_result(lc->ld, msg, &lderr, NULL,
2689 if (stat == LDAP_SUCCESS)
2690 stat = lderr;
2691 stat = ldap_result2error(lc->ld, msg, 0);
2695 &stat);
2698 stat == LDAP_REFERRAL && referralsp != NULL) {
2699 releaseCon(lc, stat);
2703 lc = findReferralCon(referralsp, &stat);
2712 LDAP_OPT_ERROR_NUMBER, &stat);
2715 stat = ldap_result(lc->ld, msgid, 0, &tv, &msg);
2716 if (stat == 0) {
2717 stat = LDAP_TIMEOUT;
2718 } else if (stat == -1) {
2720 LDAP_OPT_ERROR_NUMBER, &stat);
2722 stat = ldap_parse_result(lc->ld, msg, &lderr,
2724 if (stat == LDAP_SUCCESS)
2725 stat = lderr;
2736 ldap_err2string(stat));
2740 ldap_err2string(stat));
2743 if (stat == LDAP_NO_SUCH_OBJECT) {
2749 stat = LDAP_SUCCESS;
2752 releaseCon(lc, stat);
2755 return (stat);