Commit Graph

6299 Commits

Author SHA1 Message Date
Pedro Albuquerque
cc035a95a2 po: update pt.po (from translationproject.org)
Note: This fixes the yes/no matching strings for mke2fs and tune2fs if
Portuguese is in use.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-30 17:08:17 -04:00
Eric Biggers
0e660ee145 tests: add test for e2fsck of verity file
Test that e2fsck doesn't report errors when an inode with the 'verity'
flag has blocks past i_size.

This is a regression test for commits 3baafde6a8 ("e2fsck: allow
verity files to have initialized blocks past i_size") and 43466d0396
("e2fsck: handle verity files in scan_extent_node()").

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-30 17:08:08 -04:00
Theodore Ts'o
40aa2743b5 Update release notes, etc., for the 1.45.2 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 22:21:49 -04:00
Theodore Ts'o
2638a78bba po: update the binary gmo files
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 20:05:54 -04:00
Theodore Ts'o
0e0dad426a mke2fs: accept the english yes character to the proceed question
In some cases if the translation file is missing some translations,
mke2fs can end up printing an English message, e.g.:

% LANG=it_IT.UTF-8 ./mke2fs /tmp/foo.img 8M
mke2fs 1.45.1 (12-May-2019)
/tmp/foo.img contiene un file system ext4
	created on Mon May 27 19:35:48 2019
Proceed anyway? (y,N)

However, if there is a translation for string to match with "yY"
(e.g., to "sS" for Italian), then 'y' won't work.  Fix this by falling
back to the english 'yY' characters.

Addresses-Debian-Bug: #907034
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 19:36:15 -04:00
Sharuzzaman Ahmat Raslan
b6ee243576 po: update ms.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 15:10:31 -04:00
Antonio Ceballos
a1694bda21 po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 15:10:31 -04:00
Eric Biggers
43466d0396 e2fsck: handle verity files in scan_extent_node()
Don't report PR_1_EXTENT_END_OUT_OF_BOUNDS on verity files during
scan_extent_node(), since they will have blocks stored past i_size.

This was missed during the earlier fix because this check only triggers
if the inode has enough extents to need at least one extent index node.

This bug is causing one of the fs-verity xfstests to fail with the
reworked fs-verity patchset.

Fixes: 3baafde6a8 ("e2fsck: allow verity files to have initialized blocks past i_size")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 15:10:31 -04:00
Theodore Ts'o
188bf39acf configure: fix test where cron is not installed on a non-systemd system
Reported-by: thomas@linuxfromscratch.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 15:10:31 -04:00
Theodore Ts'o
c0d5e63376 po: add new Portuguese translation from the Translation Project
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-27 15:10:20 -04:00
Göran Uddeborg
1753555aeb po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-22 12:31:37 -04:00
Theodore Ts'o
30d90608b8 debian: update changelog for maintenance releases
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-22 12:31:04 -04:00
Theodore Ts'o
cf62b892eb e2scrub_all: fix missing getopts argument which broke e2scrub_all -C
Addresses-Debian-Bug: #929287

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-20 20:34:59 -04:00
Theodore Ts'o
6cf9a7f03f e2scrub: fix grammar nit: "a LVM" -> "an LVM"
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-20 10:56:51 -04:00
Yuri Chornoivan
e712a7ca90 po: update uk.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-18 23:44:02 -04:00
Jakub Bogusz
93d058dc3e po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-18 23:44:02 -04:00
Petr Pisar
6da5f5242a po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-18 23:44:02 -04:00
Theodore Ts'o
fbb9bfa4a5 e2scrub_all: avoid scrubbing all devices when there is nothing to scrub
Running lsblk when there are no valid block devicse results in
generating all block devices as the list of devices to scrub; this
results in a lot of e2scrub_all failures.

Addresses-Debian-Bug: #929186

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-18 23:43:55 -04:00
Theodore Ts'o
9d41a057d9 e2scrub: stop cron spam if lvm2 is not installed.
Addresses-Debian-Bug: #928977

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-18 21:43:57 -04:00
Theodore Ts'o
2a214d1bba Update release notes, etc., for the 1.45.1 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-12 21:23:53 -04:00
Theodore Ts'o
a033d4ef03 e2fsck: remove an potentially ambiguous dangling else clause
This doesn't actually fix a bug or change behavior, but it removes a
clang warning.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-12 02:23:08 -04:00
Theodore Ts'o
ef54444e6d libext2fs: hide struct ext2fs_hashmap as an internal implementation detail
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-12 02:23:08 -04:00
Theodore Ts'o
6cfb145e34 mke2fs: fix memory leak when parsing encoding flags
Also fix extended-options usage string.

Addresses-Coverity-Bug: 1444984
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-12 02:23:08 -04:00
Theodore Ts'o
756ccf548c e2fsck: fix printf format / argument mismatches
Fixes-Coverity-Bug: 1444982
Fixes-Coverity-Bug: 1444983
Fixes-Coverity-Bug: 1444985
Fixes-Coverity-Bug: 1444986
Fixes-Coverity-Bug: 1444987
Fixes-Coverity-Bug: 1444988
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-12 02:23:08 -04:00
Theodore Ts'o
03b04dbca7 libext2fs: add missing check for utf8lookup()'s return value
Fixes-Coverity-Bug: 1442630
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
2019-05-12 02:23:01 -04:00
Michael Haubenwallner
e212d95fbb Fix parallel install issue in scrub subdir
In scrub/Makefile the various 'install-*' targets do not explicitly
depend on their corresponding 'installdirs-*' target, so they get run
in parallel.

Addresses-Gentoo-Bug: #680030

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-10 18:36:51 -04:00
Theodore Ts'o
7cc9cdea86 e2fsck: fix XML validity problem with the problem log
Also fix a gcc warning.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-10 18:36:46 -04:00
Theodore Ts'o
65c4930203 Update release notes, etc., for the 1.45.1-rc1 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-06 19:31:31 -04:00
Theodore Ts'o
d2dd606fab e2fsck: add support for saving the problem code log
Add the ability to save a log of problems found by e2fsck in a log
file that can be specified via /etc/e2fsck.conf.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-06 10:15:41 -04:00
Theodore Ts'o
06014d726d e2scrub: make the e2scrub service files require CAP_SYS_ADMIN and CAP_SYS_RAWIO
Addresses-Debian-Bug: #926138

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-06 10:15:41 -04:00
Theodore Ts'o
66300c5701 e2scrub: tag the *.e2scrub LV's with UDISK_IGNORE in udev
Force the *.e2scrub LV's to be ignored by udisk.

Addresses-Debian-Bug: #926112

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-06 10:15:41 -04:00
Andreas Dilger
f6cf3e6193 mke2fs: fix check for absurdly large devices
The check in mke2fs is intended to be for the number of blocks in the
filesystem exceeding the maximum number of addressable blocks in 2^32
bitmaps, which is (2^32 * 8 bits/byte * blocksize) = 2^47 blocks,
or 2^59 bytes = 512PiB for the common 4KiB blocksize.

However, s_log_blocksize holds log2(blocksize_in_kb), so the current
calculation is a factor of 2^10 too small.  This caused mke2fs to fail
while trying to format a 900TB filesystem.

Fixes: 101ef2e93c ("mke2fs: Avoid crashes / infinite loops for absurdly large devices")
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-06 10:15:41 -04:00
Theodore Ts'o
d0efd17a43 e2fsck: check and fix tails of all bitmap blocks
Currently, e2fsck effectively checks only tail of the last inode and
block bitmap in the filesystem. Thus if some previous bitmap has unset
bits it goes unnoticed.  Mostly these tail bits in the bitmap are
ignored; however, if blocks_per_group are smaller than 8*blocksize,
the multi-block allocator in the kernel can get confused when the tail
bits are unset and return bogus free extent.

Add support to libext2fs to check these bitmap tails when loading
bitmaps (as that's about the only place which has access to the bitmap
tail bits) and make e2fsck use this functionality to detect buggy bitmap
tails and fix them (by rewriting the bitmaps).

Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
2019-05-06 10:15:29 -04:00
Theodore Ts'o
4a274baf2a debian: update libext2fs2.symbols file
Update to reflect changes to avoid leaking utf8 and nls symbols into
the namespace.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-04 22:51:43 -04:00
Theodore Ts'o
201aff895a libext2fs: move struct ext2fs_nls_table to the private ext2fsP.h header
Callers of libext2fs don't need to use this structure, and this gives
us the ability to change it later on without worrying about
changing public ABI's.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-03 16:43:05 -04:00
Theodore Ts'o
28887533bb Rename the feature "fname_encoding" to be "casefold".
Also change mke2fs so that the encoding and encoding flags are
specified in mke2fs.conf in the fs_types and defaults stanzas instead
of the options stanza.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-03 13:16:29 -04:00
Theodore Ts'o
cc8df47c83 debugfs: teach set_super_value how to set the s_encoding field
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-02 13:19:01 -04:00
Theodore Ts'o
5a7761e88f libe2p: print the filename character encoding in list_super[2]
Also clean up some gcc -Wall warnings while we're at it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-05-02 12:16:16 -04:00
Theodore Ts'o
3f85a4c9a8 libext2fs: remove utf8_* namespace contamination
Merge nls_utf8-norm.c and nls_utf8.c.  This also allows us to comment
out functions which we don't actually need for e2fsprogs.

Also fix some gcc -Wall complaints, including one which would have
caused utf8_casefold() to misbehave (this was fixed in the kernel, but
not carried back to e2fsprogs).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-29 09:18:47 -04:00
Theodore Ts'o
388e1d56d9 libext2fs: remove nls_* namespace contamination
Also remove nls.h, and avoid declaring static functions and variables
in a header file, which is wasteful of space.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-29 09:18:12 -04:00
Eric Biggers
ca82f176f1 libext2fs: remove unused variable 'old_flags'
In ext2fs_write_inode2(), the 'old_flags' variable is never used.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 20:37:45 -04:00
Eric Biggers
8817d2542e debugfs: remove unused variable 'tmp_inode'
In parse_inode_csum(), the outer 'tmp_inode' variable is never used.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 20:37:21 -04:00
Eric Biggers
094507fded libext2fs: remove unused variable 'buff'
In ext2fs_dirhash2(), the outer 'buff' variable is never used.

Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 20:36:30 -04:00
Eric Biggers
a003778998 debugfs: fix encoding handling in dx_hash command
Fix the following bugs:

1. 'encoding' and 'hash_flags' are not initialized, causing a segfault.

2. 'hash_flags' incorrectly uses a __bitwise type.

3. The optstring doesn't contain "c" or "e", so the -c and -e options
   aren't recognized.

4. The code that handles the -e option always returns.

Fixes: ef733f1a97 ("debugfs: support encoding when printing the file hash")
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 20:35:25 -04:00
Eric Biggers
9033a31e26 debugfs: avoid ambiguity when printing filenames
The way debugfs escapes filenames is ambiguous because a sequence like
M-A can mean either the byte 'A' + 128 == 0xc1 or the three bytes
{'M', '-', 'A'}.  Similarly, ^A can mean either the byte
'A' ^ 0x40 == 0x01 or the two bytes {'^', 'A'}.

Fix this and simplify the code by switching to a simpler strategy where
all bytes < 32, all bytes >= 127, and backslash are encoded with C-style
hex escape sequences.  E.g., the byte 0xc1 will now be encoded as \xc1
rather than M-A as it was before, while a filename consisting of the
three bytes {'M', '-', 'A'} will continue to be shown as M-A.

I want to fix this mainly because I want to use debugfs to retrieve raw
encrypted filenames for ciphertext verification tests.  But this doesn't
work if the returned filenames are ambiguous.

Fixes: 68a1de3df3 ("debugfs: pretty print encrypted filenames in the ls command")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 19:42:41 -04:00
Gabriel Krisman Bertazi
1384050b7a ext4.5.in: document design changes on the casefold attribute
Document the fact that the encoding support is only used by directories
with the +F attribute.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 16:53:08 -04:00
Gabriel Krisman Bertazi
f61719cf47 ext2fs: drop ASCII NLS support
As agreed on the kernel side, ext4 will only support utf8 for now, and
not plain ASCII, so we don't need this anymore.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 16:52:12 -04:00
Gabriel Krisman Bertazi
1b6d59d699 ext2fs: drop Unicode normalization support
No longer necessary after +F design change.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 16:48:01 -04:00
Gabriel Krisman Bertazi
a8567fdb93 ext2fs: don't normalize names on -F directories
As agreed on the new design, even if fname_encoding is enabled,
directories entries who aren't owned by a +F directory will not be
normalized.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 16:45:41 -04:00
Gabriel Krisman Bertazi
a7fba47ef0 ext2fs: nls: Update to unicode 12.1.0
Since we didn't release a kernel version that supports version 11.0.0,
it should be safe to reuse the sb entry for version 12.1.0.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-04-28 16:39:22 -04:00