The hard-coded override is very old, and isn't necessary --- in fact,
it's actively harmful because we are using one or two symbols that
were added to libss2 after e2fsprogs 1.34. So remove it.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
We renamed libcomerr2 to libcom-err2 in 1.43.9. So generating
dependencies of the form libcom-err2 (>= 1.34) don't really make any
sense.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Create the full NEWS.gz and put it in /usr/share/doc/e2fsprogs instead
of the RELEASE-NOTES file to comply with the Debian policy 4.2.0.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The hard-coded override is very old, and isn't necessary --- in fact,
it's actively harmful because we are using one or two symbols that
were added to libss2 after e2fsprogs 1.34. So remove it.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
We renamed libcomerr2 to libcom-err2 in 1.43.9. So generating
dependencies of the form libcom-err2 (>= 1.34) don't really make any
sense.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Create the full NEWS.gz and put it in /usr/share/doc/e2fsprogs instead
of the RELEASE-NOTES file to comply with the Debian policy 4.2.0.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This is needed so we can assemble a complete release notes file via a
command like:
cat $(/bin/ls -1 doc/RelNotes/v*.txt | tac) | gzip -9n > NEWS.gz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2image in modes without data blocks copy (-r, -Q) doesn't copy
mmp block that leads to fsck error:
Superblock has invalid MMP magic. Fix? no
This patch adds coping this block if mmp is enabled.
Change-Id: I66035ee394a0ff53b9959e82b3e47050f3bf1593
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Since ext4 verity is going to be an RO_COMPAT feature rather than an
INCOMPAT one, the on-disk i_size of verity inodes needs to be the data
size rather than the full size. Consequently, verity inodes will have
initialized blocks past i_size, containing the Merkle tree and other
verity metadata. So e2fsck must not fix the i_size of such inodes as it
normally would.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The new ro_compat filesystem feature flag for fs-verity was added to
EXT2_FEATURE_RO_COMPAT_SUPP, but that's not actually used by e2fsprogs
itself. So contrary to the v1.44.4 release notes, 'mke2fs -O verity'
doesn't actually work, nor does e2fsck allow the filesystem to have the
verity feature. Fix it by adding the flag to the correct place
(EXT2_LIB_FEATURE_RO_COMPAT_SUPP) too.
Fixes: faae7aa00d ("Reserve codepoints for the fsverity feature.")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The verity flag was mapped to EXT4_PROJINHERIT_FL, presumably due to a
copy+paste error. Fix it.
Fixes: faae7aa00d ("Reserve codepoints for the fsverity feature.")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This can be found by running the test t_replay_and_set under valgrind.
Reported-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
The only place that's using |product_out| is android_configure_fs().
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Bug: 111439984
Test: generated image has correct permission
Change-Id: I2602686b6b92c3e61a541b8794d266b1ee6a00d1
From AOSP commit: 57c92af0ac608dbb27de9f882336e28de7bb1fa2
If the value being printed has embedded quotes ("), then printing
those quotes could confuse other tools when parsing the value.
This is the simplest CL to fix the security issue, and we can circle
back to think about more robust escaping in a future CL.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Bug: 80436257
Test: manual
Change-Id: Ica17f2c5701573bceafe34f20110d230a3925483
From AOSP commit: efe90c297a8df591c051fdbfacb92b5283390bba
Volume label name is 16 bit unicode string according to spec.
Currently blkid labels the device without converting it to
utf-8 chars due to which incorrect label is displayed.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Bug: 74184636
Test: manual
Change-Id: Ib16204c75c2cdf675d480e9c66f484bb3c51108e
From AOSP commit: 25715073b170970469126426196c9e5084613c37
For platforms whose libc don't supply strdup(), the replacement strdup
function in lib/ext2fs/tdb.c needs to always initialize the length
variable.
Reported-by: Vladyslav Tsilytskyi <ykp@protonmail.ch>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
There's no point creating two separate tarfiles. It's not clear
anyone was actually using the subset tarball --- and if they are, they
can replace it by the full source distribution and using the
--enable-subset option.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
It adds extra complexity for not much gain, and stands in the way of
generating the release tarfile via git archive.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
They are removed when we generate the tarball, and they serve no
useful purpose, so let's remove them. This will be help us to create
the tarball using git archive more easily.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Now that we use a symlink for the top-level RELEASE-NOTES file, the
previous strategy of using a symlink to force the prefix in the tar
file and then using tar -h won't work. So change how we generate the
tar file to take advantage of GNU tar's --transform option.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Test that mke2fs does not allow to create file system with both
resize_inode and meta_bg features enabled.
This was fixes with commit 42e77d5d ("libext2fs: don't create
filesystems with meta_bg and resize_inode").
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Test if the e2fsck can fix file system with resize_inode and meta_bg
features enabled simultaneously.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Previous e2fsprogs versions allowed to create a file system with both
resize_inode and meta_bg enabled. This was fixed by upstream commit
42e77d5d ("libext2fs: don't create filesystems with meta_bg and resize_inode")
However e2fsck still does not recognize the conflict and will attempt to
clear and recreate resize_inode if it's corrupted due to this incompatible
feature combination, though it will create it in the same wrong layout.
Fix it by teaching e2fsck to recognize resize_inode and meta_bg
conflict and fixing it by disabling and clearing resize inode.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs now links to a new libext2_support library, which only includes
cstring.c (Android separates other pieces of libsupport into separate
libraries).
e2fsck now builds with -Wno-unused-variable to work around an unused
variable introduced by cabde4999d.
libext_e2p builds the new ljs.c file, and links to ws2_32 on Windows for
ntohl().
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Change-Id: I42edce0478f1529f44acdbef1495ec5270e3a61e
From AOSP commit: af14814afe0cb3389ecc4b9e9422bd7e8962e0ed
This is needed after 3fb715b554 which
conditionally included sysmacros.h.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Change-Id: I52e3da4d9ea0f5efbf685a9c4a266f33357f8d8c
From AOSP commit: a5deff7b7ee15a5ba5d65516326ce4c42daa1027
bionic does not define _LINUX_TYPES_H but does define __bitwise, so we
conditionally define it here.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Change-Id: I500ccd469ea7de2e53ab8bd75720a412c86cf18b
From AOSP commit: 77f2eea2717e18e80a31d80c7721b9e0ed8e0cba
Due to hard links inodes can have multiple names (except for folders),
ncheck should find all of the names (equal to the number of links to the
inodes, directories excepted), not names to the count of the provided
inodes.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>