From d03fb78e688e222f06f01ae4c096ca7067500fec Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Oct 2009 20:08:43 +0000 Subject: debian/patches/libdiskfs-rename.patch: New patch to fix ext2fs hang on renaming directory to something/. --- debian/patches/libdiskfs-rename.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 debian/patches/libdiskfs-rename.patch (limited to 'debian/patches/libdiskfs-rename.patch') diff --git a/debian/patches/libdiskfs-rename.patch b/debian/patches/libdiskfs-rename.patch new file mode 100644 index 00000000..e530a6c7 --- /dev/null +++ b/debian/patches/libdiskfs-rename.patch @@ -0,0 +1,23 @@ +diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c +index 747c666..d0e5b60 100644 +--- a/libdiskfs/dir-rename.c ++++ b/libdiskfs/dir-rename.c +@@ -19,6 +19,7 @@ + + #include "priv.h" + #include "fs_S.h" ++#include + + /* To avoid races in checkpath, and to prevent a directory from being + simultaneously renamed by two processes, we serialize all renames of +@@ -44,6 +45,10 @@ diskfs_S_dir_rename (struct protid *fromcred, + if (! tocred) + return EXDEV; + ++ if (!strcmp (fromname, ".") || !strcmp (fromname, "..") ++ || !strcmp (toname, ".") || !strcmp (toname, "..") ++ return EINVAL; ++ + if (tocred->po->shadow_root != fromcred->po->shadow_root) + /* Same translator, but in different shadow trees. */ + return EXDEV; -- cgit v1.2.3