*** nameinfo.c	Wed Mar 29 09:14:57 2006
--- nameinfo.c.new	Mon May  1 12:41:49 2006
***************
*** 577,588 ****
    char *ptr;
    char buffer[CF_BUFSIZE];
   
! strcpy(VFQNAME,hostname); // By default VFQNAME = hostname (nodename)
  
  if (strstr(VFQNAME,".") == 0)
     {
!    // The nodename is not full qualified
!    // We'll try to find the FQDN hostname
  
     if (gethostname(fqn, sizeof(fqn)) != -1)
        {
--- 577,590 ----
    char *ptr;
    char buffer[CF_BUFSIZE];
   
! strcpy(VFQNAME,hostname); /* By default VFQNAME = hostname (nodename) */
  
  if (strstr(VFQNAME,".") == 0)
     {
!    /*
!       The nodename is not full qualified
!       We'll try to find the FQDN hostname
!    */
  
     if (gethostname(fqn, sizeof(fqn)) != -1)
        {
***************
*** 592,601 ****
           {
           if (strstr(hp->h_name,"."))
              {
!             // We find a FQDN hostname
!             // So we change the VFQNAME variable
              strncpy(VFQNAME,hp->h_name,CF_MAXVARSIZE);
!             VFQNAME[CF_MAXVARSIZE-1]=0; // Be sure the string is null terminated
              }
           }
        }
--- 594,606 ----
           {
           if (strstr(hp->h_name,"."))
              {
!             /*
!                We find a FQDN hostname
!                So we change the VFQNAME variable
!             */
              strncpy(VFQNAME,hp->h_name,CF_MAXVARSIZE);
! 	    /* Be sure the string is null terminated */
!             VFQNAME[CF_MAXVARSIZE-1]=0;
              }
           }
        }
***************
*** 607,613 ****
  
  if (strstr(VFQNAME,"."))
     {
! // If VFQNAME is full qualified we can create VDOMAIN variable
     ptr = strchr(VFQNAME, '.');
     strcpy(VDOMAIN, ++ptr);
     DeleteClassFromHeap("undefined_domain");
--- 612,618 ----
  
  if (strstr(VFQNAME,"."))
     {
! /* If VFQNAME is full qualified we can create VDOMAIN variable */
     ptr = strchr(VFQNAME, '.');
     strcpy(VDOMAIN, ++ptr);
     DeleteClassFromHeap("undefined_domain");
