Lines Matching defs:attrs
55 LDAPMod **attrs;
446 tmp->attrs = (LDAPMod **) calloc (sizeof (LDAPMod *), flags);
447 if (tmp->attrs == (LDAPMod **) NULL)
456 tmp->attrs[i] = (LDAPMod *) malloc (sizeof (LDAPMod));
457 if (tmp->attrs[i] == (LDAPMod *) NULL)
463 tmp->attrs[0]->mod_op = LDAP_MOD_ADD;
464 tmp->attrs[0]->mod_type = "objectClass";
467 tmp->attrs[0]->mod_values = objectClasses;
470 tmp->attrs[0]->mod_values = topObjectClasses;
471 tmp->attrs[1] = NULL;
478 tmp->attrs[1]->mod_op = LDAP_MOD_ADD;
479 tmp->attrs[1]->mod_type = "relativeDomainName";
480 tmp->attrs[1]->mod_values = (char **) calloc (sizeof (char *), 2);
482 if (tmp->attrs[1]->mod_values == (char **)NULL)
485 tmp->attrs[1]->mod_values[0] = strdup (name);
486 tmp->attrs[1]->mod_values[2] = NULL;
490 tmp->attrs[2]->mod_op = LDAP_MOD_ADD;
491 tmp->attrs[2]->mod_type = strdup (ldap_type_buffer);
492 tmp->attrs[2]->mod_values = (char **) calloc (sizeof (char *), 2);
494 if (tmp->attrs[2]->mod_values == (char **)NULL)
497 tmp->attrs[2]->mod_values[0] = strdup (data);
498 tmp->attrs[2]->mod_values[1] = NULL;
500 tmp->attrs[3]->mod_op = LDAP_MOD_ADD;
501 tmp->attrs[3]->mod_type = "dNSTTL";
502 tmp->attrs[3]->mod_values = (char **) calloc (sizeof (char *), 2);
504 if (tmp->attrs[3]->mod_values == (char **)NULL)
508 tmp->attrs[3]->mod_values[0] = strdup (charttl);
509 tmp->attrs[3]->mod_values[1] = NULL;
511 tmp->attrs[4]->mod_op = LDAP_MOD_ADD;
512 tmp->attrs[4]->mod_type = "zoneName";
513 tmp->attrs[4]->mod_values = (char **)calloc(sizeof(char *), 2);
514 tmp->attrs[4]->mod_values[0] = gbl_zone;
515 tmp->attrs[4]->mod_values[1] = NULL;
517 tmp->attrs[5] = NULL;
525 for (i = 0; tmp->attrs[i] != NULL; i++)
529 (ldap_type_buffer, tmp->attrs[i]->mod_type,
530 strlen (tmp->attrs[i]->mod_type)))
532 attrlist = get_attr_list_size (tmp->attrs[i]->mod_values);
533 tmp->attrs[i]->mod_values =
534 (char **) realloc (tmp->attrs[i]->mod_values,
537 if (tmp->attrs[i]->mod_values == (char **) NULL)
543 for (x = 0; tmp->attrs[i]->mod_values[x] != NULL; x++);
545 tmp->attrs[i]->mod_values[x] = strdup (data);
546 tmp->attrs[i]->mod_values[x + 1] = NULL;
550 tmp->attrs =
551 (LDAPMod **) realloc (tmp->attrs,
553 if (tmp->attrs == NULL)
560 for (x = 0; tmp->attrs[x] != NULL; x++);
561 tmp->attrs[x] = (LDAPMod *) malloc (sizeof (LDAPMod));
562 tmp->attrs[x]->mod_op = LDAP_MOD_ADD;
563 tmp->attrs[x]->mod_type = strdup (ldap_type_buffer);
564 tmp->attrs[x]->mod_values = (char **) calloc (sizeof (char *), 2);
565 tmp->attrs[x]->mod_values[0] = strdup (data);
566 tmp->attrs[x]->mod_values[1] = NULL;
567 tmp->attrs[x + 1] = NULL;
723 result = ldap_add_s (conn, dnbuffer, ldinfo->attrs);