Lines Matching refs:tmp
77 int get_attr_list_size (char **tmp);
115 ldap_info *tmp;
315 for (tmp = ldap_info_base; tmp != NULL; tmp = tmp->next)
319 printf ("Adding DN: %s\n", tmp->dn);
321 add_ldap_values (tmp);
399 ldap_info *tmp;
400 for (tmp = ldap_info_base; tmp != (ldap_info *) NULL; tmp = tmp->next)
402 if (!strncmp (tmp->dn, dn, strlen (dn)))
403 return tmp;
425 ldap_info *tmp;
431 if ((tmp = locate_by_dn (dn)) == NULL)
437 tmp = (ldap_info *) malloc (sizeof (ldap_info));
438 if (tmp == (ldap_info *) NULL)
445 tmp->dn = strdup (dn);
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;
472 tmp->attrcnt = 2;
473 tmp->next = ldap_info_base;
474 ldap_info_base = tmp;
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;
518 tmp->attrcnt = flags;
519 tmp->next = ldap_info_base;
520 ldap_info_base = tmp;
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,
552 sizeof (LDAPMod) * ++(tmp->attrcnt));
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;
573 get_attr_list_size (char **tmp)
576 char **ftmp = tmp;
593 char *tmp;
606 tmp = &zname[strlen (zname) - strlen (zone)];
607 *--tmp = '\0';
609 zname = ++tmp;
620 for (tmp = strrchr (zname, '.'); tmp != (char *) 0;
621 tmp = strrchr (zname, '.'))
623 *tmp++ = '\0';
624 dn_buffer[i++] = tmp;
644 char tmp[128];
646 bzero (tmp, sizeof (tmp));
654 sprintf (tmp, "relativeDomainName=%s + dNSTTL=%d,", dc_list[x], ttl);
656 sprintf(tmp, "relativeDomainName=%s,",dc_list[x]);
658 sprintf(tmp,"dc=%s,", dc_list[x]);
662 sprintf(tmp, "dc=%s,", dc_list[x]);
666 strncat (dn, tmp, sizeof (dn) - strlen (dn));
669 sprintf (tmp, "dc=%s", dc_list[0]);
670 strncat (dn, tmp, sizeof (dn) - strlen (dn));