Commit Graph

4648 Commits (28b966d7c667049f19a2947441ed29a95b415469)

Author SHA1 Message Date
Theodore Ts'o fa8b1c0281 libquota: add error checking to quota_remove_inode
Addresses-Coverity-Id: #709475

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-07 09:10:24 -05:00
Theodore Ts'o 3f10707d90 libquota: add error checking to quota_write_inode()
Addresses-Coverity-Id: #709476

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-07 09:10:24 -05:00
Theodore Ts'o 2641bf8991 libext2fs: remove redundant code in rb_print_stats()
Addresses-Coverity-Id: #709550

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-07 09:10:24 -05:00
Theodore Ts'o 2c98ce4b56 e2fsck: fix memory leak on error path in read_bad_blocks_files()
Addresses-Coverity-Id: #1049170

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-07 09:10:24 -05:00
Theodore Ts'o d887b93701 libext2fs: make ext2fs_group_desc_csum return 0 if meta_csum not enabled
Addresses-Coverity-Id: #1147784

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-07 09:10:24 -05:00
Theodore Ts'o 125f76e73b e2fsck: release allocated memory on error or abort in e2fsck_pass1()
Addresses-Coverity-Id: #1148450

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-07 09:10:19 -05:00
Theodore Ts'o 1d1f708e44 libss: fix potential memory leak on realloc() failure
Commit 191a03ac5f was an incorrect fix for this issue.  Fix it up.

Addresses-Coverity-ID: #295143
Addresses-Coverity-ID: #1148451

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-06 22:54:12 -05:00
Theodore Ts'o d2dce124dd Merge branch 'maint' into next
Conflicts:
	debian/changelog
	e2fsck/Makefile.in
2014-01-06 06:58:58 -05:00
Theodore Ts'o 340493b6bc e2fsck: add error checking when moving the quota inode
Addresses-Coverity-Bug: #1049140

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o 5d5576d8bb libblkid: fix memory overrun in probe_lvm2
Addresses-Coverity-ID: #1049167

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o c2c69597ab test_extents: fix a possible memory leak
Addresses-Coverity-Bug: #1049185

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o ece2d5884b libext2fs: fix potential memory leak in qcow2_write_raw_image()
Addresses-Coverity-ID: #1049179
Addresses-Coverity-ID: #1049180

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o 191a03ac5f libss: fix potential memory leak on realloc() failure
Addresses-Coverity-ID: #295143

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o ee781cff92 debian: renable use of internal uuid and blkid libraries for e2fsck.static
Now that the diet libc support is working again, we need to use the
internal uuid and blkid library in order for e2fsck.static to be
compiled properly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o 795c02def3 Use consistent e2fsprogs-standard types
Some different types such as u_int16_t and __uint32_t have snuck into
e2fsprogs.  These types are not guaranteed by any standard, and they
are not provided by dietlibc.  Convert them to __u16, __u32,
etc. since these are guaranteed to be provided by e2fsprogs' build.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Theodore Ts'o 6c59a665da configure: fix --with-diet-libc
Newer versions of autoconf pull in AC_PROG_GCC as part of
AC_CANONICAL_HOST.  So we need check for WITH_DIET_LIBC earlier in
configure.in.

Also, e2fsprogs now needs functions which are found in diet libc's
compat library.  So add support for autoconf's LIBS function, and
automatically set libs to include -lcompat.

Finally, disable compiling e4defrag by deault if --with-diet-libc is
specified because the program has too many glibc dependencies.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Baruch Siach 9a39389185 e4defrag: choose the best available posix_fadvise variant
Use posix_fadvise64() when available.  This allows 64bit offsets on
32bit systems.

[ Modified by tytso to try to use fadvise64() as well, and to remove
  the attempt to call the syscall directly, since because and
  complexities caused by required dummy arguments on some
  architectures, it's not worth the hair.  ]

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-01-05 22:55:10 -05:00
Theodore Ts'o 603fc2cb4b e2fsck: fix possible double free when searching for config file
This happens if there is an error while scanning a directory for
config file fragments.  This is rarely used, which is why we didn't
notice this.

Addresses-Coverity-Bug: #1138576

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-04 19:11:37 -05:00
Theodore Ts'o b34b94d5cd debugfs: clean up read_journal_block() to avoid Coverity complaint
The read_journal_block() function was needlessly complicated, which
made it harder to read/maintain, and it also tripped up Coverity.
Cleaning it up also avoided some signed/unsigned casts, and allows us
to avoid passing got back to the caller, since it wasn't needed.

Addresses-Coverity-Bug: #709539

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-04 19:11:37 -05:00
Theodore Ts'o 2873927d15 subst: clean up various coverity nits
Add appropriate error checking for all error returns, and only open
each file that we need to manipulate once, to avoid potential
time-of-check/time-of-use races.  (Not that this is likely for this
program, but the result is much more clean.)

We also preserve the atime in the case where the file has not changed.

Addresses-Coverty-Id: #709537
Addresses-Coverty-Id: #1049150
Addresses-Coverty-Id: #1049151

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-04 19:11:37 -05:00
Theodore Ts'o 75954ccf2a libblkid: fix sizeof(foo) vs sizeof(*foo) malloc() bug
Addresses-Coverity-Bug: #709510

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2014-01-04 19:11:37 -05:00
Theodore Ts'o fa24c8faa1 e2image: avoid potential divide by zero
It's highly unlikely after five seconds that zero blocks would have
been written, but let's silence the Coverity warning.

Addresses-Coverity-ID: 1147780

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2014-01-04 19:11:37 -05:00
Theodore Ts'o 781c0df508 e2image: eliminate division by zero
Dividing a floating point number by zero is undefined in C.  It
happens to work with gcc/glibc, but it's not something that's
guaranteed.

Addresses-Coverity-ID: #1147781

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2014-01-04 19:11:37 -05:00
Theodore Ts'o e9b5923544 e2image: fix resource leak when running e2image -n
Addresses-Coverity-ID: #1147783

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2014-01-04 19:11:37 -05:00
jon ernst e38bfbe912 e2image: mark strings for internationalization
Signed-off-by: Jon Ernst <jonernst07@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-01-04 19:11:36 -05:00
Theodore Ts'o 4f06566b78 e2fsck.conf: clarify man page's description of accept_time_fudge
Addresses-Debian-Bug: #719189

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-04 19:11:36 -05:00
Theodore Ts'o c32409aec6 e2fsck: improve the "superblock corrupt" message
Previously, this message used 8193 as the example alternate
superblock.  But for most file systems, the backup superblock is
located at 32768 (since most file systems have a block size of 4k, and
not 1k).

Addresses-Debian-Bug: #719185

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-04 19:11:30 -05:00
Theodore Ts'o 5c4c38763c mke2fs: use [^]feature instead of just feature in the man page
Addresses-Debian-Bug: #719184

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-31 22:53:52 -05:00
Theodore Ts'o a7da1af701 debian: add mention of the badblocks program in the package description
Addresses-Debian-Bug: #718725

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-31 22:34:52 -05:00
Theodore Ts'o 88ee023be2 mke2fs: add support to create the file system at an offset
This can be useful when creating a disk image for virtual machines.

Addresses-Debian-Bug: #497984

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 23:03:09 -05:00
Theodore Ts'o 4bd63b215f update config.h.in file to enable loopback mount detection
Commit fbabd5c44c added loopback mount detection.  However, we
failed to update the config.h file, so the code wasn't actually
enabled.  Fix this oversight.

Addresses-Debian-Bug: #497984

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 22:41:48 -05:00
Theodore Ts'o 091e984ee6 debian: update changelog for 1.42.9-2 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 17:40:31 -05:00
Theodore Ts'o efeda9d529 debian: rationalize configure options management
As part of the debian build, the e2fsprogs sources are built multiple
times --- for the udeb packages, for e2fsck.static, etc.  Make sure
that when we disable the use of the built-in blkid and uuid libraries
(in favor of the ones shipped with util-linux), that we do so for all
of the builds.

Previously we were using the internal blkid library for e2fsck.static.
While this isn't completely broken, the internal blkid library hasn't
been maintained in quite some time, so it's better to use the
util-linux blkid library instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 17:38:45 -05:00
Eric Whitney a25fffae5c debugfs: restore and tweak original error messaging
In response to reviewer comments, commit fe56188b07 included changes
that modified some of the code used to output error messages when
checking user-supplied block numbers.  These changes converted calls
to parse_ulonglong() to calls to strtoblk().  Because strtoblk() calls
parse_ulonglong(), and both output error messages, two redundant and
relatively generic messages were output on each error.

Fix this by removing the error message output from strtoblk(), and
extending it to accept an optional error message argument that it
supplies in lieu of a default to parse_ulonglong().  Also, revert to
the more descriptive original error messages with mods per reviewer
comments, and fix an error message in do_replace_node().

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 16:56:19 -05:00
Theodore Ts'o d7e6e97871 e2image: fix printf format type match
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 16:56:19 -05:00
Theodore Ts'o 7f2c7495e3 debian: use dh_strip --dbg-package to populate the dbg packages
Use the --dbg-package option instead of manually moving the files into
the debug packages.  This is simpler to maintain, and avoids a problem
where creating directories using mkdir -p can create world-writeable
/usr/lib directory dependind on the umask used by the Debian buildd.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-30 15:48:06 -05:00
Theodore Ts'o 9c846766fd Merge branch 'maint' into next
Conflicts:
	RELEASE-NOTES
	debian/changelog
	version.h
2013-12-28 23:27:39 -05:00
Theodore Ts'o 036a84710d Update release notes, etc., for final 1.42.9 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-28 23:19:52 -05:00
Trần Ngọc Quân 7f196ef755 po: update vi.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:45 -05:00
Volkan Gezer 90ff6ed73f po: update tr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:45 -05:00
Göran Uddeborg bf9227f275 po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:45 -05:00
Jakub Bogusz ca9a0a7e33 po: update pl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:45 -05:00
Benno Schulenberg d2cc8e1f92 po: update nl.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:45 -05:00
Samuel Thibault 69e73088c4 po: update fr.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:45 -05:00
Philipp Thomas e9955e7164 po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:44 -05:00
Petr Pisar 13261f5180 po: update cs.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:44 -05:00
Walter Garcia-Fontes 1b2c78749c po: update ca.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-12-28 22:34:44 -05:00
Theodore Ts'o d055089567 e2freefrag: avoid integer overflow when reporting free space statistics
An integer overflow could happen if the file system is large and has
very large contiguous chunks of free space.

Addresses-Debian-Bug: #718205

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-28 22:25:11 -05:00
Theodore Ts'o 2d8637b150 debugfs: document the lsdel command in the man page
Addresses-Debian-Bug: #731329

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-28 22:15:59 -05:00
Theodore Ts'o 9518b29727 mke2fs: clarify documentation about bigalloc in the man page
Addresses-Debian-Bug: #669730

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-28 17:57:25 -05:00