From: Jeffrey Altman Date: Thu, 3 Sep 2009 02:44:33 +0000 (-0400) Subject: Windows: avoid inappropriate dns searches X-Git-Tag: openafs-devel-1_5_63~51 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=baa883aa6b878abe808d302d14142f702dfb9cca;p=packages%2Fo%2Fopenafs.git Windows: avoid inappropriate dns searches Do not perform searches for cells if the string prefix matches _._AFS_IOCTL_._. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/394 Tested-by: Asanka Herath Reviewed-by: Asanka Herath Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_config.c b/src/WINNT/afsd/cm_config.c index e525a1790..b54216c75 100644 --- a/src/WINNT/afsd/cm_config.c +++ b/src/WINNT/afsd/cm_config.c @@ -92,6 +92,7 @@ IsWindowsModule(const char * name) } p = strrchr(name, '.'); if (p) { + /* as of 2009-09-04 these are not valid ICANN ccTLDs */ if (i == 1 && (!cm_stricmp_utf8N(p,".dll") || !cm_stricmp_utf8N(p,".exe") || @@ -693,10 +694,12 @@ long cm_SearchCellByDNS(char *cellNamep, char *newCellNamep, int *ttl, * Do not perform a DNS lookup if the name is * either a well-known Windows DLL or directory, * or if the name does not contain a top-level - * domain. + * domain, or if the file prefix is the afs pioctl + * file name. */ if ( IsWindowsModule(cellNamep) || - cm_FsStrChr(cellNamep, '.') == NULL) + cm_FsStrChr(cellNamep, '.') == NULL || + strncasecmp(cellNamep, CM_IOCTL_FILENAME_NOSLASH, strlen(CM_IOCTL_FILENAME_NOSLASH)) == 0) return -1; rc = getAFSServer(cellNamep, cellHostAddrs, cellHostNames, ipRanks, &numServers, ttl);