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>
e2fsck: release allocated memory on error or abort in e2fsck_pass1()

Addresses-Coverity-Id: #1148450

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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>
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>
libext2fs: remove redundant code in rb_print_stats()

Addresses-Coverity-Id: #709550

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
libquota: add error checking to quota_write_inode()

Addresses-Coverity-Id: #709476

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
libquota: add error checking to quota_remove_inode

Addresses-Coverity-Id: #709475

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
libext2fs: fix memory leaks on error paths in ext2fs_create_icount_tdb

Addresses-Coverity-Id: #1138575

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs: remove dead code

Addresses-Coverity-Id: #1138573

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
badblocks: print warning if set_o_direct() fails

Addresses-Coverity-Id: #1049148

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
libss: fix memory leak if realloc() fails in ss_parse()

Addresses-Coverity-Id: #709491

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Fix up workarounds for dietlibc breakage

The dietlibc doesn't support the TZ environment variable, which is
required by the standard.  Work around this so that we can run the
regression test suite when building with dietlibc.  (This is useful
for finding problems.)

With this change, the only thing which doesn't work as far as dietlibc
is concerned is the posix_memalign test, and the MMP support tests
(because posix_memalign isn't provided by dietlibc, sigh.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Merge branch 'maint' into next

Conflicts:
	e2fsck/pass1.c
	lib/ext2fs/csum.c
debugfs: fix typo in commit 5a1d25a7b

The typo causes a compiler warning, but it's otherwise harmless.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
libblkid: clean up some integer promotion / signed issues

Addresses-Coverity-Id: #1049165
Addresses-Coverity-Id: #1049164
Addresses-Coverity-Id: #1049163
Addresses-Coverity-Id: #1049162
Addresses-Coverity-Id: #709508
Addresses-Coverity-Id: #709507
blkid: add fallthrough comment

Addresses-Coverity-Id: #709484

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
libuuid: check return value of uuid_parse() in test

Addresses-Coverity-Id: #709477

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Save and restore umask around calls to mkstemp()

The races would be hard to exploit, but let's close them off.

Addresses-Coverity-Id: #709504
Addresses-Coverity-Id: #709505
Addresses-Coverity-Id: #709506

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
util: fix make dependencies for subst

Now that subst is using config.h, we need to fix its dependencies so
that if config.h is missing (i.e., after a "make clean" in the tree)
that it is rebuilt by the Makefile rule.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Merge branch 'maint' into next