[OpenAFS-devel] blocking certain lookups when running afsdb

chas williams - CONTRACTOR chas.williams@cmf.nrl.navy.mil
Sat, 25 Aug 2012 20:24:44 -0400


recently it was pointed out to me that the macos client (when using
-afsdb) does SRV lookups for Trashes and TemporaryItems when the finder
checks for .Trashes and .TemporaryItems in /Network/afs.

right now, libafs blocks lookups for certain paths on darwin:

from src/afs/VNOPS/afs_vnop_lookup.c:

	#if defined(AFS_DARWIN_ENV)
	    /* Workaround for MacOSX Finder, which tries to look for
	     * .DS_Store and Contents under every directory.
	     */
	    if (afs_fakestat_enable && adp->mvstat == 1) {
		if (strcmp(aname, ".DS_Store") == 0)
		    tryEvalOnly = 1;
		if (strcmp(aname, "Contents") == 0)
		    tryEvalOnly = 1;
	    }
	    if (afs_fakestat_enable && adp->mvstat == 2) {
		if (strncmp(aname, "._", 2) == 0)
		    tryEvalOnly = 1;
	    }

if we add these new paths to the list, it will make cells called Trashes,
TemporaryItems, DS_Store or Contents difficult to use consistently
across all the different afs clients.  the question i have, is this
really a concern?  according to the admin/install guide:

	Two of the most important restrictions are that the name cannot
	include uppercase letters or more than 64 characters.

so it seems like these names (Contents, TemporaryItems) are already a
bad idea for cells.

so instead of creating an ever growing list of "you shouldnt use these on
this or that platform", perhaps cell names for afsdb lookups need check
for minimally conforming cell names before a lookup is sent out.  since _
isnt part of a valid domain name, that would also encompass existing check.
(this doesnt fix the mvstat == 1 cases, oh well)

so, does anyone need or use MiXeD cAsE cElL nAmEs wItH _'s?