Commit Graph

5552 Commits (1944d8c53d613b5185b5fe6734007f41324e4421)

Author SHA1 Message Date
Theodore Ts'o 8fce6511d9 Clean up spelling errors and other nits in man pages
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-24 13:37:21 -04:00
Theodore Ts'o c414e897ef tests: fix filter.sed to filter out version numbers of the form 1.43
The regular expression worked for version numbers such as 1.42.12, but
not if there isn't a third component in the version number.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-24 13:37:07 -04:00
Theodore Ts'o 93715de136 debian: update changelog with changes made to date
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-22 20:57:32 -04:00
Theodore Ts'o 8fb86b46b8 debian: loosen up dependency on debhelper
In order to allow this package to be built on jessie, just depend on
debhelper >= 9.0.  We will test to see if dh_update_autotools_config
exists and only use it if it is present.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-22 03:20:25 -04:00
Theodore Ts'o 697e21fa61 debian: build with hardening set to "all"
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-22 03:19:30 -04:00
Theodore Ts'o fd1677e801 Add --enable-hardening which builds e2fsprogs with security hardening
Enable the following security features: stack protection, fortify,
read-only relocation tables, immediate dynamic symbol binding, and
text segment ASLR by enabling position independent executable
(PIE).

Special handling is provided for shared library and statically linked
executables.  For all the gory details please see:

   https://lists.debian.org/debian-devel/2016/05/msg00302.html

Distributions who want to do their own special thing can set CFLAGS,
CFLAGS_SHLIB, CLFAGS_STLIB, LDFLAGS, LDFLAGS_SHLIB and LDFLAGS_STATIC
as appropriate.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-22 01:58:09 -04:00
Theodore Ts'o bc1ec4b459 e2fsck: fix project quota support
Use a large_inode so that when e2fsck is fixing a file system with
project quota enabled, the correct project id's quota is adjusted when
a corrupted inode is deleted.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 22:18:16 -04:00
Theodore Ts'o 4bfb35e1e6 mke2fs: fix project quota creation
Creating a file system with project quotas can fail if mke2fs is built
using hardening options.  This is because quota_compute_usage() used
ext2fs_get_next_inode() instead of ext2fs_get_inode_full(), and a
small inode was passed into quota_data_add, when a large inode needs
to be used.  As a result get_dq() would end up dereferencing undefined
space in the stack.  Without the hardening options, this would be
zero, so "mke2fs -t ext4 -O project.quota -I 256 test.img" would work
essentially by accident.

Fix this by using ext2fs_get_inode_full() so that a large inode is
available to quota_data_inodes().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 20:31:59 -04:00
Theodore Ts'o 3a50a3eaf2 debian: Use Package-Type instead of XC-Package-Type
XC-Package-Type was deprecated and replaced with Package-Type starting
in dpkg-dev 1.15.7.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 14:13:34 -04:00
Theodore Ts'o b41a4ffa50 e2fsck: use com_err error codes instead of EBADMSG and EUCLEAN
Some operating systems may not define EBADMSG and EUCLEAN, so for
better portability use our own private error code numbers.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 13:44:41 -04:00
Theodore Ts'o 78b7cd3b1e Clean up spelling errors and other nits in man pages
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 13:40:49 -04:00
Theodore Ts'o eba83bd3ce debian: fix spelling mistakes in copyright files
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 12:43:37 -04:00
Theodore Ts'o 77e9d989f4 debian: fix packaging nits
Fix bad date in debian/changelog, as well as a dropped entry for
1.43~WIP.2016.03.15-2.

Tighted dependency version for debhelper to reflect use of
dh_update_autotools_config.

Removed unused source Lintian overrides.

Thanks to Mattia Rizzolo for pointing these out.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 10:54:36 -04:00
Theodore Ts'o d3a2ca5cde debian: remove unused and deprecated substitution variables
Replace "Source-Version" with "binary:Version" in
e2fsprogs.shlibs.local, and e2fsck-static doesn't have any shared
libraries dependency so remove the ${shlibs:Depends} from the Depends.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit a4d77554fe)
2016-05-21 00:19:28 -04:00
Theodore Ts'o 3e53f0f427 debian: backup/restore the po files which get modified during the build
Before running "make update-gmo", backup the po/*.gmo and po/*.po
files so they can be restored when "make -f debian/rules clean" is
run.  This allows the Debian source tree to built and rebuilt.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 2c0e8c7aac)
2016-05-21 00:19:21 -04:00
Theodore Ts'o a4d77554fe debian: remove unused and deprecated substitution variables
Replace "Source-Version" with "binary:Version" in
e2fsprogs.shlibs.local, and e2fsck-static doesn't have any shared
libraries dependency so remove the ${shlibs:Depends} from the Depends.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-21 00:15:46 -04:00
Theodore Ts'o 2c0e8c7aac debian: backup/restore the po files which get modified during the build
Before running "make update-gmo", backup the po/*.gmo and po/*.po
files so they can be restored when "make -f debian/rules clean" is
run.  This allows the Debian source tree to built and rebuilt.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-20 23:43:29 -04:00
Theodore Ts'o e7d848266a tests: fix filter.sed to filter out version numbers of the form 1.43
The regular expression worked for version numbers such as 1.42.12, but
not if there isn't a third component in the version number.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-20 21:02:09 -04:00
Theodore Ts'o 73fb183d03 Merge branch 'next' into debian-packaging 2016-05-20 15:38:47 -04:00
Theodore Ts'o 6d8f698171 debian: update changelog for 1.43-2
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-20 15:38:36 -04:00
Theodore Ts'o a67286396e debian: create dbgsym packages if debhelper supports them
Starting with Debian Stretch, we now have support for dbgsym packages
which are uploaded to a separate package archive.  Since some people
might want to try to backport e2fsprogs 1.43 for Jessie set things up
so that the package can be built on older Debiain systems (where the
legacy dbg packages will be created) as well as newer (as of this
writing, Debian Sid or Stretch).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-20 15:38:31 -04:00
Theodore Ts'o 01995578ed debian: only try to execute update-initramfs if it exists
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-20 13:37:20 -04:00
Theodore Ts'o 43e6c79a73 debian: use dh_update_autotools_config to update config.{guess,sub}
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-20 13:14:09 -04:00
Theodore Ts'o 74428c9ba7 debian: update watch file to check the GPG signed tar files
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-19 18:24:29 -04:00
Theodore Ts'o 350497fe84 Add debian packaging for patches/enable-metadata_csum-by-default
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 01:50:16 -04:00
Theodore Ts'o 79ac4caa77 Revert "mke2fs.conf: don't enable metadata_csum by default"
This reverts commit 0da058af9f.

For debian testing let's be more aggressive about testing the
metadata_csum feature.
2016-05-17 01:40:19 -04:00
Theodore Ts'o d6adf070b0 Update release notes for a 1.43 (17-Mar-2016) 2016-05-17 01:32:58 -04:00
Theodore Ts'o 0da058af9f mke2fs.conf: don't enable metadata_csum by default
For the 1.43 release, we will not be enabling the metadata_csum
feature by default.  We will leave that up to distribution vendors to
decide whether they want to be aggressive about enabling this feature
by default.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 01:32:58 -04:00
Theodore Ts'o 2520f77178 tests: rename t_mke2fs_errors and t_mke2fs_offset
The 't' prefix is for tune2fs tests.  The 'm' prefix is for mke2fs
tests.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 00:58:34 -04:00
Theodore Ts'o 051fd4e028 misc: fix various Coverity warnings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-17 00:53:47 -04:00
Marcus Huewe 0935fa8da3 e2undo: support the undo header's fs_offset feature
If the fs_offset feature is present (and no "-o offset"
option is specified), e2undo performs the undo operation at
the stored offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:36:39 -04:00
Marcus Huewe ab7313f036 libext2fs: add fs_offset entry to the undo header
The fs_offset entry stores the filesystem offset. This allows for an
easy undo, because one does not have to remember/specify the
filesystem offset manually.
The fs_offset entry is implemented as a compatible feature.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:36:12 -04:00
Marcus Huewe 6930537d52 e2undo: add "-o offset" option to specify the filesystem offset
This is useful if the filesystem is located at an arbitrary
offset instead of the beginning of a device or file.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:36:00 -04:00
Marcus Huewe abf70cdcc1 libext2fs: fix key extension in undo_write_tdb
Support key extension if the tdb_data_size is an arbitrary integer
multiple of the channel's block size. Before, key extension was only
possible if the tdb_data_size and the channel's block size were
equal.
Note: a key, whose data is the result of a short read, will be
extended if the tdb_data_size and the channel's block size are equal
(that's what the old code did) (if tdb_data_size is an arbitrary
integer multiple (> 1) of the channel's block size, the key might
be extended as well (depending on the keysize)).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:35:44 -04:00
Marcus Huewe a7ea2ec02c libext2fs: fix offset code in undo_write_tdb
The old code has some issues, for example, when backing up fs block 0
(can be reproduced via "mke2fs -z undo -b 1024 -E offset=1024 out 1024"):
* backing_blk_num is set to ULLONG_MAX instead of 0
* data is read from the beginning of the file instead of offset 1024
* data_ptr is set to read_ptr - 1024 ("invalid" address)

Hence, the wrong fs block is associated with the wrong data.
For details, see also commit 76da764639cbfcc998f13c263a11a4601bcb9961.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:35:04 -04:00
Marcus Huewe cc090a3634 tests: testcases for the offset handling in e2undo and undo_io.c
The testcase "u_offset" tests/defines e2undo's new UI and offset
handling code. The testcase "u_mke2fs_opt_offset" documents some
issues with undo_io.c's old offset handling code (e.g., backup of
fs block 0, key extension (tdb_data_size != block_size) etc.).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:26:09 -04:00
Marcus Huewe dc01088db5 mke2fs: fix filesystem size calculation, if an offset is specified
If a filesystem size is explicitly specified, it should be used without
subtracting the offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:25:14 -04:00
Marcus Huewe 093d9b4006 tests: test "mke2fs -E offset=N" filesystem size calculation
If "mke2fs -E offset=N ..." is called without a specified filesystem size,
the offset should be subtracted from the default filesystem size (see
commit 87d9b2fb). If "mke2fs -E offset=N ..." is called with an
explicitly specified filesystem size, the specified filesystem size
should be used.

Also, call dd with the "iflag=fullblock" option, if it is going to read
from a pipe.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 15:08:46 -04:00
Theodore Ts'o fd80e987d7 debian: make e2fsprogs.postinst abort on error
Also fix typo in the postinst script

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 01:51:46 -04:00
Theodore Ts'o 3de9843235 Update release notes for a 1.43-WIP release (12-May-2016)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 01:02:53 -04:00
Theodore Ts'o 4baef0a235 Update e2fsprogs translation template file 2016-05-12 01:01:46 -04:00
Theodore Ts'o b8d0b0e1f6 fuse2fs.1: fix man page section of fuse2fs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 00:02:07 -04:00
Theodore Ts'o 52d4a5b0bd debian: stop using dietlibc to build the static binaries
It's better to keep the e2fsprogs binaries consistently all using
glibc.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-12 00:00:38 -04:00
Theodore Ts'o 3888c1e84d libext2fs: sanity check group argument to ext2fs_clear_{block,inode}_uninit()
Avoid a potential out-of-bounds memory access if the group passed to
ext2fs_clear_block_uninit() or ext2fs_clear_inode_uninit() is greater
than the number of groups in the file system.  This prevents a failure
in resize2fs when to allocate a block when growing the file system
significantly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-11 23:23:06 -04:00
Theodore Ts'o d0e855fa47 misc: avoid PATH_MAX dependency in create_inode.c
Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-11 00:08:58 -04:00
Theodore Ts'o b8aa9b6294 libext2s: only define FS_IOC_FIEMAP on Linux systems
Hurd and *BSD is not going to have FS_IOC_FIEMAP, at least not at
Linux's codepoint.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:44:21 -04:00
Theodore Ts'o 5a0affdb7d debian: disable fus2fs for Hurd
Hurd's libfuse is not compatible with the Linux version of libfuse.

Addresses-Debian-Bug: #822576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:41:38 -04:00
Theodore Ts'o 0a1883c31a debian: update initramfs in e2fsprogs's postinst script
Addresses-Debian-Bug: #804237

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:27:04 -04:00
Theodore Ts'o f9b16db868 More man page and usage message fixups
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 23:23:14 -04:00
Theodore Ts'o aaa1ae0856 resize2fs, libext2fs: fix bugs in sparse_super2 support
Fix resize2fs so that the location of the backup superblocks when the
sparse_super2 feature is enabled is properly set when growing the file
system from a single block group to larger file system sizes.

Also fix a bug where the block group summary statistics in some cases
when exapnding a sparse_super2 file system.

Finally, accurately calculate the file system metadata overhead of the
last block group in sparse_super2 file systems.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10 21:06:15 -04:00