Lines Matching defs:ls

58 	__nis_ldap_search_t	*ls;
63 ls = am(myself, sizeof (*ls));
64 if (ls == 0)
67 ls->base = sdup(myself, T, base);
68 if (ls->base == 0 && base != 0)
70 ls->scope = scope;
73 ls->filterComp = am(myself, numFilterComps *
74 sizeof (ls->filterComp[0]));
75 if (ls->filterComp == 0) {
80 ls->filterComp[i] = sdup(myself, T, filterComp[i]);
81 if (ls->filterComp[i] == 0 && filterComp[i] != 0)
84 ls->numFilterComps = numFilterComps;
86 ls->filter = concatenateFilterComps(ls->numFilterComps,
87 ls->filterComp);
88 if (ls->filter == 0)
92 ls->filterComp = 0;
93 ls->numFilterComps = 0;
94 ls->filter = sdup(myself, T, filter);
95 if (ls->filter == 0 && filter != 0)
101 ls->attrs = am(myself, (na + 1) * sizeof (ls->attrs[0]));
102 if (ls->attrs != 0) {
104 ls->attrs[i] = sdup(myself, T, attrs[i]);
105 if (ls->attrs[i] == 0 && attrs[i] != 0)
108 ls->attrs[na] = 0;
109 ls->numAttrs = na;
114 ls->attrs = 0;
115 ls->numAttrs = 0;
118 ls->attrsonly = attrsonly;
119 ls->isDN = isDN;
122 freeLdapSearch(ls);
123 ls = 0;
126 return (ls);
130 freeLdapSearch(__nis_ldap_search_t *ls) {
133 if (ls == 0)
136 sfree(ls->base);
137 if (ls->filterComp != 0) {
138 for (i = 0; i < ls->numFilterComps; i++) {
139 sfree(ls->filterComp[i]);
141 sfree(ls->filterComp);
143 sfree(ls->filter);
144 if (ls->attrs != 0) {
145 for (i = 0; i < ls->numAttrs; i++) {
146 sfree(ls->attrs[i]);
148 sfree(ls->attrs);
151 free(ls);
182 __nis_ldap_search_t *ls = 0;
209 ls = buildLdapSearch(base, objectDN->read.scope, 0, 0, filter,
212 return (ls);
255 ls = buildLdapSearch(locDN[0], LDAP_SCOPE_BASE, 0, 0,
264 if (ls != 0) {
265 ls->useCon = 1;
266 return (ls);
293 ls = buildLdapSearch(objectDN->read.base,
297 ls = buildLdapSearch(objectDN->write.base,
302 if (ls == 0)
322 tmpComp = addFilterComp(b.buf, ls->filterComp,
323 &ls->numFilterComps);
329 freeLdapSearch(ls);
332 ls->filterComp = tmpComp;
337 if (ls->numFilterComps > 0) {
338 sfree(ls->filter);
339 ls->filter = concatenateFilterComps(ls->numFilterComps,
340 ls->filterComp);
341 if (ls->filter == 0) {
345 freeLdapSearch(ls);
353 * the rule set. We have an 'ls', so use it to ldapSearch()
360 rvtmp = ldapSearch(ls, &nv, 0, 0);
371 ls->useCon = 1;
372 return (ls);
1235 findYPCon(__nis_ldap_search_t *ls, int *stat) {
1272 if (ls->useCon == 0) {
1333 * Perform an LDAP search operation per 'ls', adding the result(s) to
1347 ldapSearch(__nis_ldap_search_t *ls, int *numValues, __nis_rule_value_t *rvIn,
1373 if (ls == 0) {
1380 if ((lc = findYPCon(ls, ldapStat)) == 0) {
1452 if (ls->timeout.tv_sec || ls->timeout.tv_usec) {
1453 tv = ls->timeout;
1461 if (doVLV && ls->base != LDAP_SCOPE_BASE) {
1482 stat = ldap_search_ext_s(lc->ld, ls->base,
1483 ls->scope, ls->filter, ls->attrs,
1484 ls->attrsonly, ctrls, 0, &tv,
1487 } else if (doSP && ls->base != LDAP_SCOPE_BASE) {
1506 stat = ldap_search_ext_s(lc->ld, ls->base,
1507 ls->scope, ls->filter, ls->attrs,
1508 ls->attrsonly, ctrls, 0, &tv,
1511 stat = ldap_search_st(lc->ld, ls->base, ls->scope,
1512 ls->filter, ls->attrs, ls->attrsonly,
1521 lc = (yp2ldap)?findYPCon(ls, ldapStat):
1583 lc->ld, NIL(ls->base), ls->scope);
1586 NIL(ls->filter), ls->attrs, ls->attrsonly,
1805 if (yp2ldap && ls->useCon == 0) {
2069 __nis_ldap_search_t *ls;
2094 ls = buildLdapSearch(dn, LDAP_SCOPE_BASE, 0, 0, "objectClass=*",
2096 if (ls == 0) {
2105 rvldap = ldapSearch(ls, &nv, 0, &lderr);
2106 freeLdapSearch(ls);