From 171ed8bf140c3179dc9dfe9ddd585810ebdd7d59 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 9 Nov 1996 10:25:04 +0000 Subject: [PATCH] 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. --- sys/gnu/ext2fs/ext2_lookup.c | 2 +- sys/gnu/fs/ext2fs/ext2_lookup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c index af3a7bbfa87d..baeaa52775ff 100644 --- a/sys/gnu/ext2fs/ext2_lookup.c +++ b/sys/gnu/ext2fs/ext2_lookup.c @@ -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] != '.') { diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c index af3a7bbfa87d..baeaa52775ff 100644 --- a/sys/gnu/fs/ext2fs/ext2_lookup.c +++ b/sys/gnu/fs/ext2fs/ext2_lookup.c @@ -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] != '.') {