[PATCH] Re: copy to ../ from archive



Hi folks,

Pavel Tsekov and I tackled this problem. Problem are the calls to
MC_NAMEOP in vfs/vfs.c. The callargs use path, but should use the
canonicalized path (mpath) as call argument instead. See attached patch.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research

vfs/Changelog:
	* vfs.c: fix MC_NAMEOP macro calls to use the canonicalized path.

--- vfs/vfs.c.000	2004-11-09 14:23:06.000000000 +0100
+++ vfs/vfs.c	2004-11-15 16:46:44.000000000 +0100
@@ -360,15 +360,15 @@ int mc_##name inarg \
     return result; \
 }
 
-MC_NAMEOP (chmod, (const char *path, int mode), (vfs, path, mode))
-MC_NAMEOP (chown, (const char *path, int owner, int group), (vfs, path, owner, group))
-MC_NAMEOP (utime, (const char *path, struct utimbuf *times), (vfs, path, times))
-MC_NAMEOP (readlink, (const char *path, char *buf, int bufsiz), (vfs, path, buf, bufsiz))
-MC_NAMEOP (unlink, (const char *path), (vfs, path))
-MC_NAMEOP (symlink, (const char *name1, const char *path), (vfs, name1, path))
-MC_NAMEOP (mkdir, (const char *path, mode_t mode), (vfs, path, mode))
-MC_NAMEOP (rmdir, (const char *path), (vfs, path))
-MC_NAMEOP (mknod, (const char *path, int mode, int dev), (vfs, path, mode, dev))
+MC_NAMEOP (chmod, (const char *path, int mode), (vfs, mpath, mode))
+MC_NAMEOP (chown, (const char *path, int owner, int group), (vfs, mpath, owner, group))
+MC_NAMEOP (utime, (const char *path, struct utimbuf *times), (vfs, mpath, times))
+MC_NAMEOP (readlink, (const char *path, char *buf, int bufsiz), (vfs, mpath, buf, bufsiz))
+MC_NAMEOP (unlink, (const char *path), (vfs, mpath))
+MC_NAMEOP (symlink, (const char *name1, const char *path), (vfs, name1, mpath))
+MC_NAMEOP (mkdir, (const char *path, mode_t mode), (vfs, mpath, mode))
+MC_NAMEOP (rmdir, (const char *path), (vfs, mpath))
+MC_NAMEOP (mknod, (const char *path, int mode, int dev), (vfs, mpath, mode, dev))
 
 
 #define MC_HANDLEOP(name, inarg, callarg) \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]