Lines Matching refs:mods

211 freeModList(LDAPMod **mods)  in freeModList()  argument
216 if (mods == NULL) in freeModList()
219 for (i = 0; mods[i]; i++) { in freeModList()
223 if (mods[i]->mod_type) { in freeModList()
224 if (strcasecmp(mods[i]->mod_type, "objectclass") == 0) in freeModList()
226 free(mods[i]->mod_type); in freeModList()
229 if (mods[i]->mod_bvalues == NULL) in freeModList()
236 if (mods[i]->mod_op & LDAP_MOD_BVALUES) { in freeModList()
237 if (mods[i]->mod_bvalues[0]) in freeModList()
238 free(mods[i]->mod_bvalues[0]); in freeModList()
252 for (j = 0; mods[i]->mod_values[j]; j++) in freeModList()
253 free(mods[i]->mod_values[j]); in freeModList()
257 free(mods[i]->mod_bvalues); in freeModList()
261 free((char *)(mods[0])); in freeModList()
262 free(mods); in freeModList()
273 LDAPMod **mods, *modlist; in __s_api_makeModListCount() local
287 mods = (LDAPMod **)calloc((count + 3), sizeof (LDAPMod *)); in __s_api_makeModListCount()
288 if (mods == NULL) { in __s_api_makeModListCount()
296 free(mods); in __s_api_makeModListCount()
316 mods[i] = &modlist[i]; in __s_api_makeModListCount()
317 mods[i]->mod_op = mod_op; in __s_api_makeModListCount()
340 mods[i]->mod_type = strdup(attr[k]->attrname); in __s_api_makeModListCount()
341 if (mods[i]->mod_type == NULL) in __s_api_makeModListCount()
409 rc = init_bval_mod(mods[i], mod_op, in __s_api_makeModListCount()
415 mods[i] = NULL; in __s_api_makeModListCount()
430 mods[i] = &modlist[i]; in __s_api_makeModListCount()
445 rc = init_bval_mod(mods[i], mod_op, in __s_api_makeModListCount()
451 mods[i] = NULL; in __s_api_makeModListCount()
470 rc = init_bval_mod(mods[i], mod_op, in __s_api_makeModListCount()
476 mods[i] = NULL; in __s_api_makeModListCount()
484 mods[i] = &modlist[i]; in __s_api_makeModListCount()
498 rc = init_bval_mod(mods[i], mod_op, in __s_api_makeModListCount()
504 mods[i] = NULL; in __s_api_makeModListCount()
518 mods[i] = &modlist[i]; in __s_api_makeModListCount()
532 rc = init_bval_mod(mods[i], mod_op, in __s_api_makeModListCount()
538 mods[i] = NULL; in __s_api_makeModListCount()
551 mods[i]->mod_type = strdup(mapping[0]); in __s_api_makeModListCount()
552 if (mods[i]->mod_type == NULL) { in __s_api_makeModListCount()
570 if (strcasecmp(mods[i]->mod_type, "objectclass") == 0) { in __s_api_makeModListCount()
607 mods[i]->mod_values = modval; in __s_api_makeModListCount()
610 return (mods); in __s_api_makeModListCount()
613 freeModList(mods); in __s_api_makeModListCount()
662 LDAPMod **mods, in write_state_machine() argument
799 mods, NULL, NULL); in write_state_machine()
809 mods, NULL, NULL); in write_state_machine()
814 mods, NULL, NULL, &msgid); in write_state_machine()
824 mods, NULL, NULL, &msgid); in write_state_machine()
1124 LDAPMod **mods; in __ns_ldap_addAttr() local
1137 mods = __s_api_makeModList(service, attr, LDAP_MOD_ADD, flags); in __ns_ldap_addAttr()
1138 if (mods == NULL) { in __ns_ldap_addAttr()
1143 (char *)dn, mods, cred, flags, errorp); in __ns_ldap_addAttr()
1144 freeModList(mods); in __ns_ldap_addAttr()
1160 LDAPMod **mods; in __ns_ldap_delAttr() local
1173 mods = __s_api_makeModList(service, attr, LDAP_MOD_DELETE, flags); in __ns_ldap_delAttr()
1174 if (mods == NULL) { in __ns_ldap_delAttr()
1179 (char *)dn, mods, cred, flags, errorp); in __ns_ldap_delAttr()
1181 freeModList(mods); in __ns_ldap_delAttr()
1281 LDAPMod **mods; in __ns_ldap_repAttr() local
1342 mods = __s_api_makeModList(service, attr, LDAP_MOD_REPLACE, flags); in __ns_ldap_repAttr()
1343 if (mods == NULL) in __ns_ldap_repAttr()
1347 (char *)dn, mods, cred, flags, errorp); in __ns_ldap_repAttr()
1349 freeModList(mods); in __ns_ldap_repAttr()
1364 LDAPMod **mods = NULL; in __ns_ldap_addEntry() local
1381 mods = __s_api_makeModListCount(service, attr, LDAP_MOD_ADD, in __ns_ldap_addEntry()
1383 if (mods == NULL) { in __ns_ldap_addEntry()
1389 freeModList(mods); in __ns_ldap_addEntry()
1394 new_dn ? new_dn : (char *)dn, mods, cred, flags, errorp); in __ns_ldap_addEntry()
1398 freeModList(mods); in __ns_ldap_addEntry()