Fixed lookup of ".." in checkpath. It always failed, so renames of

directories to a different parent directory always failed.  This bug
was caused by 4.4Lite2 changing the directory format and ext2fs not
keeping up.

Should be in 2.2.
This commit is contained in:
Bruce Evans 1996-11-09 10:25:04 +00:00
parent 891ccbd5b7
commit 171ed8bf14
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19562
2 changed files with 2 additions and 2 deletions

View File

@ -1046,7 +1046,7 @@ ext2_checkpath(source, target, cred)
IO_NODELOCKED, cred, (int *)0, (struct proc *)0);
if (error != 0)
break;
namlen = dirbuf.dotdot_namlen;
namlen = ((struct odirtemplate *)&dirbuf)->dotdot_namlen; /* XXX */
if (namlen != 2 ||
dirbuf.dotdot_name[0] != '.' ||
dirbuf.dotdot_name[1] != '.') {

View File

@ -1046,7 +1046,7 @@ ext2_checkpath(source, target, cred)
IO_NODELOCKED, cred, (int *)0, (struct proc *)0);
if (error != 0)
break;
namlen = dirbuf.dotdot_namlen;
namlen = ((struct odirtemplate *)&dirbuf)->dotdot_namlen; /* XXX */
if (namlen != 2 ||
dirbuf.dotdot_name[0] != '.' ||
dirbuf.dotdot_name[1] != '.') {