It definitely was put in originally to solve a particular problem. I only remember vaguely that some sites/systems would intentionally? put invalid values in and this was a crude way to detect those and not use them.
I am fine with the code being taken out (we can always put something back if problems develop). Barry On Jun 6, 2013, at 1:46 PM, Jed Brown <[email protected]> wrote: > Barry, you added this logic in 2002. Is it solving a particular > problem? This is by no means a complete list of valid TLDs, and local > networks could use arbitrary hostnames. Delete it? > > > /* check if domain name is not a dnsdomainname and nuke it */ > ierr = PetscStrlen(name,&ll);CHKERRQ(ierr); > if (ll > 4) { > const char *suffixes[] = {".edu",".com",".net",".org",".mil",0}; > PetscInt index; > ierr = PetscStrendswithwhich(name,suffixes,&index);CHKERRQ(ierr); > if (!suffixes[index]) { > ierr = PetscInfo1(0,"Rejecting domainname, likely is NIS > %s\n",name);CHKERRQ(ierr); > name[l-1] = 0; > } > }
