.. in the root of a filesystem

Tim Smith tim at callan.UUCP
Sat Sep 8 10:26:26 AEST 1984


In namei, when checking to see if it should scan
the mount table for a link backwards across
a file system, it does the following:

	if( u.u_dent.d_ino == ROOTINO )
	if( dp->i_number == ROOTINO )
	if( u.u_dent.d_name[1] == '.' )
		/*
		 * scan the mount table.  if we find that
		 * this directory is mounted on something, we
		 * continue the search in the directory we
		 * are mounted on
		 */

Note that it only looks at the second character in the file name.
This leads to weird results if you just happen to have a directory
in the root of a mounted file system with a . in the second position,
and you also just happen to have a directory of the same name in
the directory you are mounted on.

Does anybody depend on it only looking at the second character?
Any idea why they did it this way?
-- 
"Take your time, think a lot, why, think of everything you've got,
 for you will still be here tomorrow, but your dreams may not."

					Tim Smith
			ihnp4!wlbr!callan!tim or ihnp4!cithep!tim



More information about the Comp.unix.wizards mailing list