diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-03-07 02:34:44 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-07 02:34:44 +0000 |
commit | 13f5697cd7937a708c2529e4da5bf94884df8452 (patch) | |
tree | d2d1596fb96ae52a9ddff0edbf0017ee4922227e /sys-fs/e2fsprogs/files | |
parent | Bumped to latest version for bug #291943. (diff) | |
download | historical-13f5697cd7937a708c2529e4da5bf94884df8452.tar.gz historical-13f5697cd7937a708c2529e4da5bf94884df8452.tar.bz2 historical-13f5697cd7937a708c2529e4da5bf94884df8452.zip |
Version bump #306589 by Krzysztof Olędzki.
Package-Manager: portage-2.2_rc65/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/e2fsprogs/files')
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.41.10-e2fsck-corruption.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.41.10-e2fsck-corruption.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.41.10-e2fsck-corruption.patch new file mode 100644 index 000000000000..4f24b9ada8cc --- /dev/null +++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.41.10-e2fsck-corruption.patch @@ -0,0 +1,38 @@ +From: Theodore Ts'o <tytso@mit.edu> +Date: Tue, 23 Feb 2010 04:51:26 +0000 (-0500) +Subject: e2fsck: Fix bug which can cause e2fsck -fD to corrupt non-indexed directories +X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=53fbfb2bc3490d0ff317666322dd077c08116e0c + +e2fsck: Fix bug which can cause e2fsck -fD to corrupt non-indexed directories + +E2fsprogs 1.41.10 introduced a regression (in commit b71e018) where +e2fsck -fD can corrupt non-indexed directories when are exists one or +more file names which alphabetically sort before ".". This can happen +with ext2 filesystems or for small directories (take less than a +block) which contain filenames that begin with a space or some other +punctuation mark. + +Fix this by making sure we never reorder the '.' or '..' entry in the +directory, since they must be first. + +Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> +--- + +diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c +index 780742e..ceb8543 100644 +--- a/e2fsck/rehash.c ++++ b/e2fsck/rehash.c +@@ -763,7 +763,12 @@ retry_nohash: + + /* Sort the list */ + resort: +- qsort(fd.harray, fd.num_array, sizeof(struct hash_entry), hash_cmp); ++ if (fd.compress) ++ qsort(fd.harray+2, fd.num_array-2, sizeof(struct hash_entry), ++ hash_cmp); ++ else ++ qsort(fd.harray, fd.num_array, sizeof(struct hash_entry), ++ hash_cmp); + + /* + * Look for duplicates |