Lines Matching defs:attrs
58 LDAPMod **attrs;
468 tmp->attrs = (LDAPMod **) calloc (sizeof (LDAPMod *), flags);
469 if (tmp->attrs == (LDAPMod **) NULL)
474 tmp->attrs[i] = (LDAPMod *) malloc (sizeof (LDAPMod));
475 if (tmp->attrs[i] == (LDAPMod *) NULL)
478 tmp->attrs[0]->mod_op = LDAP_MOD_ADD;
479 tmp->attrs[0]->mod_type = "objectClass";
482 tmp->attrs[0]->mod_values = objectClasses;
485 tmp->attrs[0]->mod_values = topObjectClasses;
486 tmp->attrs[1] = NULL;
493 tmp->attrs[1]->mod_op = LDAP_MOD_ADD;
494 tmp->attrs[1]->mod_type = "relativeDomainName";
495 tmp->attrs[1]->mod_values = (char **) calloc (sizeof (char *), 2);
497 if (tmp->attrs[1]->mod_values == (char **)NULL)
500 tmp->attrs[1]->mod_values[0] = strdup (name);
501 tmp->attrs[1]->mod_values[2] = NULL;
503 if (tmp->attrs[1]->mod_values[0] == NULL)
508 tmp->attrs[2]->mod_op = LDAP_MOD_ADD;
509 tmp->attrs[2]->mod_type = strdup (ldap_type_buffer);
510 tmp->attrs[2]->mod_values = (char **) calloc (sizeof (char *), 2);
512 if (tmp->attrs[2]->mod_type == NULL ||
513 tmp->attrs[2]->mod_values == (char **)NULL)
516 tmp->attrs[2]->mod_values[0] = strdup (data);
517 tmp->attrs[2]->mod_values[1] = NULL;
519 if (tmp->attrs[2]->mod_values[0] == NULL)
522 tmp->attrs[3]->mod_op = LDAP_MOD_ADD;
523 tmp->attrs[3]->mod_type = "dNSTTL";
524 tmp->attrs[3]->mod_values = (char **) calloc (sizeof (char *), 2);
526 if (tmp->attrs[3]->mod_values == (char **)NULL)
530 tmp->attrs[3]->mod_values[0] = strdup (charttl);
531 tmp->attrs[3]->mod_values[1] = NULL;
533 if (tmp->attrs[3]->mod_values[0] == NULL)
536 tmp->attrs[4]->mod_op = LDAP_MOD_ADD;
537 tmp->attrs[4]->mod_type = "zoneName";
538 tmp->attrs[4]->mod_values = (char **)calloc(sizeof(char *), 2);
540 if (tmp->attrs[4]->mod_values == (char **)NULL)
543 tmp->attrs[4]->mod_values[0] = gbl_zone;
544 tmp->attrs[4]->mod_values[1] = NULL;
546 tmp->attrs[5] = NULL;
554 for (i = 0; tmp->attrs[i] != NULL; i++)
558 (ldap_type_buffer, tmp->attrs[i]->mod_type,
559 strlen (tmp->attrs[i]->mod_type)))
561 attrlist = get_attr_list_size (tmp->attrs[i]->mod_values);
562 tmp->attrs[i]->mod_values =
563 (char **) realloc (tmp->attrs[i]->mod_values,
566 if (tmp->attrs[i]->mod_values == (char **) NULL)
569 for (x = 0; tmp->attrs[i]->mod_values[x] != NULL; x++);
571 tmp->attrs[i]->mod_values[x] = strdup (data);
572 if (tmp->attrs[i]->mod_values[x] == NULL)
574 tmp->attrs[i]->mod_values[x + 1] = NULL;
579 tmp->attrs =
580 (LDAPMod **) realloc (tmp->attrs,
582 if (tmp->attrs == NULL)
585 for (x = 0; tmp->attrs[x] != NULL; x++);
586 tmp->attrs[x] = (LDAPMod *) malloc (sizeof (LDAPMod));
587 if (tmp->attrs[x] == NULL)
589 tmp->attrs[x]->mod_op = LDAP_MOD_ADD;
590 tmp->attrs[x]->mod_type = strdup (ldap_type_buffer);
591 tmp->attrs[x]->mod_values = (char **) calloc (sizeof (char *), 2);
593 if (tmp->attrs[x]->mod_type == NULL ||
594 tmp->attrs[x]->mod_values == (char **)NULL)
597 tmp->attrs[x]->mod_values[0] = strdup (data);
598 if (tmp->attrs[x]->mod_values[0] == NULL)
600 tmp->attrs[x]->mod_values[1] = NULL;
601 tmp->attrs[x + 1] = NULL;
761 result = ldap_add_s (conn, dnbuffer, ldinfo->attrs);