Lines Matching refs:ldap_mods

2208 	LDAPMod **ldap_mods;  in php_ldap_do_modify()  local
2227 ldap_mods = safe_emalloc((num_attribs+1), sizeof(LDAPMod *), 0); in php_ldap_do_modify()
2239 ldap_mods[i] = emalloc(sizeof(LDAPMod)); in php_ldap_do_modify()
2240 ldap_mods[i]->mod_op = oper | LDAP_MOD_BVALUES; in php_ldap_do_modify()
2241 ldap_mods[i]->mod_type = NULL; in php_ldap_do_modify()
2244 ldap_mods[i]->mod_type = estrndup(ZSTR_VAL(attribute), ZSTR_LEN(attribute)); in php_ldap_do_modify()
2249 if (ldap_mods[i]->mod_type) { in php_ldap_do_modify()
2250 efree(ldap_mods[i]->mod_type); in php_ldap_do_modify()
2252 efree(ldap_mods[i]); in php_ldap_do_modify()
2256 efree(ldap_mods); in php_ldap_do_modify()
2271 ldap_mods[i]->mod_bvalues = safe_emalloc((num_values + 1), sizeof(struct berval *), 0); in php_ldap_do_modify()
2280 ldap_mods[i]->mod_bvalues[0] = (struct berval *) emalloc (sizeof(struct berval)); in php_ldap_do_modify()
2281 ldap_mods[i]->mod_bvalues[0]->bv_val = Z_STRVAL_P(value); in php_ldap_do_modify()
2282 ldap_mods[i]->mod_bvalues[0]->bv_len = Z_STRLEN_P(value); in php_ldap_do_modify()
2297 ldap_mods[i]->mod_bvalues[j] = (struct berval *) emalloc (sizeof(struct berval)); in php_ldap_do_modify()
2298 ldap_mods[i]->mod_bvalues[j]->bv_val = Z_STRVAL_P(ivalue); in php_ldap_do_modify()
2299 ldap_mods[i]->mod_bvalues[j]->bv_len = Z_STRLEN_P(ivalue); in php_ldap_do_modify()
2302 ldap_mods[i]->mod_bvalues[num_values] = NULL; in php_ldap_do_modify()
2305 ldap_mods[num_attribs] = NULL; in php_ldap_do_modify()
2318 i = ldap_add_ext(ld->link, dn, ldap_mods, lserverctrls, NULL, &msgid); in php_ldap_do_modify()
2320 i = ldap_add_ext_s(ld->link, dn, ldap_mods, lserverctrls, NULL); in php_ldap_do_modify()
2338 i = ldap_modify_ext(ld->link, dn, ldap_mods, lserverctrls, NULL, &msgid); in php_ldap_do_modify()
2340 i = ldap_modify_ext_s(ld->link, dn, ldap_mods, lserverctrls, NULL); in php_ldap_do_modify()
2360 efree(ldap_mods[i]->mod_type); in php_ldap_do_modify()
2362 efree(ldap_mods[i]->mod_bvalues[j]); in php_ldap_do_modify()
2364 efree(ldap_mods[i]->mod_bvalues); in php_ldap_do_modify()
2365 efree(ldap_mods[i]); in php_ldap_do_modify()
2368 efree(ldap_mods); in php_ldap_do_modify()
2579 LDAPMod **ldap_mods; in PHP_FUNCTION() local
2758 ldap_mods = safe_emalloc((num_mods+1), sizeof(LDAPMod *), 0); in PHP_FUNCTION()
2763 ldap_mods[i] = safe_emalloc(1, sizeof(LDAPMod), 0); in PHP_FUNCTION()
2788 efree(ldap_mods[i]); in PHP_FUNCTION()
2794 ldap_mods[i]->mod_op = oper | LDAP_MOD_BVALUES; in PHP_FUNCTION()
2795 ldap_mods[i]->mod_type = estrndup(Z_STRVAL_P(attrib), Z_STRLEN_P(attrib)); in PHP_FUNCTION()
2799 ldap_mods[i]->mod_bvalues = NULL; in PHP_FUNCTION()
2804 ldap_mods[i]->mod_bvalues = safe_emalloc((num_modvals+1), sizeof(struct berval *), 0); in PHP_FUNCTION()
2813 ldap_mods[i]->mod_bvalues[j] = NULL; in PHP_FUNCTION()
2819 ldap_mods[i]->mod_bvalues[j] = safe_emalloc(1, sizeof(struct berval), 0); in PHP_FUNCTION()
2822 ldap_mods[i]->mod_bvalues[j]->bv_len = ZSTR_LEN(modval); in PHP_FUNCTION()
2823 ldap_mods[i]->mod_bvalues[j]->bv_val = estrndup(ZSTR_VAL(modval), ZSTR_LEN(modval)); in PHP_FUNCTION()
2828 ldap_mods[i]->mod_bvalues[num_modvals] = NULL; in PHP_FUNCTION()
2833 ldap_mods[num_mods] = NULL; in PHP_FUNCTION()
2844 if ((i = ldap_modify_ext_s(ld->link, dn, ldap_mods, lserverctrls, NULL)) != LDAP_SUCCESS) { in PHP_FUNCTION()
2853 efree(ldap_mods[i]->mod_type); in PHP_FUNCTION()
2855 if (ldap_mods[i]->mod_bvalues != NULL) { in PHP_FUNCTION()
2857 for (j = 0; ldap_mods[i]->mod_bvalues[j] != NULL; j++) { in PHP_FUNCTION()
2859 efree(ldap_mods[i]->mod_bvalues[j]->bv_val); in PHP_FUNCTION()
2862 efree(ldap_mods[i]->mod_bvalues[j]); in PHP_FUNCTION()
2866 efree(ldap_mods[i]->mod_bvalues); in PHP_FUNCTION()
2870 efree(ldap_mods[i]); in PHP_FUNCTION()
2874 efree(ldap_mods); in PHP_FUNCTION()