Commit Graph

46 Commits (master)

Author SHA1 Message Date
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 330cebc0e9 Merge branch 'maint' into next
Conflicts:
	debugfs/debugfs.c
	e2fsck/Makefile.in
	lib/ext2fs/Makefile.in
	tests/test_config
2014-09-11 12:40:43 -04:00
Michael Forney 60abcd7394 tests: Add to LD_LIBRARY_PATH instead of overriding
Signed-off-by: Michael Forney <forney@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-09-08 18:55:42 -04:00
Darrick J. Wong a46300fe70 misc: create better-packaged static analysis reports
Fix some minor bugs relating to passing CFLAGS to cppcheck, and
package the cppcheck output into nicer looking reports.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-05-11 18:32:07 -04:00
Darrick J. Wong f1605243a4 all: Introduce cppcheck static checking for make C=1
Introduce more static checking via cppcheck.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-03-14 09:32:50 -04:00
Theodore Ts'o fedfb27fe5 Add coverage testing using gcov
To check the coverage of e2fsprogs's regression test, do the
following:

	configure --enable-gcov
	make -j8 ; make -j8 check ; make coverage.txt

The coverage information will be the coverage.txt and *.gcov files in
the build directories.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-02-23 00:17:09 -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
Darrick J. Wong 832cb612f8 e2fsprogs: add (optional) sparse checking to the build
Run sparse against source files when building e2fsprogs with 'make C=1'.  If
instead C=2, it configures basic ext2 types for bitwise checking with sparse,
which can help find the (many many) spots where conversion errors are
(possibly) happening.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-10-11 23:12:40 -04:00
Theodore Ts'o 1eb31c4885 resize2fs: add resource tracking as a debug option
Add a new debug flag which prints how much time is consumed by the
various parts of resize2fs's processing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-01-03 09:03:53 -05:00
Theodore Ts'o e1f0850795 Don't use in-tree header files if using system uuid or blkid libraries
This commit forces the use of the system-provided blkid or uuid header
files if we are using the system-provided blkid or uuid libraries.
This avoids using the in-tree header files with the system libraries.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-04 14:45:08 -04:00
Theodore Ts'o c13351f6c5 Add support for configure --enable-verbose-makecmds
Some people don't want to see the concise "kernel-style" make output.
This configure option allows build engines that want to see the full
set of commands executed by the makefile to get what they want.  Most
people will find this more distracting than useful, unless they need
to debug the Makefiles.

(It is not necessary to rerun configure to enable this verbose make
output temprarily; if a developer wants to do a quick debug of a
directory's makefile, he or she can simply edit the definition of the
$(E) and $(Q) variables in the Makefile; instructions can be found in
the MCONFIG file which is included in at the beginning of every
Makefile.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02 00:11:17 -04:00
Theodore Ts'o a6a1c0815c Fix Makefile dependencies for libcom_err
The e2fsprogs makefiles were using the same Makefile variable
LIBCOM_ERR for the link-line arguments as well as the dependencies.
Since LIBCOM_ERR can now include non-file arguments such as
"-lpthread", we need to use a separate DEPLIBCOM_ERR variable that
only has build file dependencies.

Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR.

Addresses-Sourceforge-Patches: #2813809

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-01 22:06:51 -04:00
Theodore Ts'o bf69235ad0 Add support for on-line resizing to resize2fs
If the filesystem is mounted, attempt to use the on-line resizing
ioctls to resize the filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17 19:45:45 -05:00
Theodore Ts'o 75e93ab097 Update "make depend" information. Fixes SMP parallel build problem.
(Addresses Sourceforge Bug: #1157933)
2005-05-06 09:37:58 -04:00
Theodore Ts'o 55f4cbd96e Add new function in e2p for parsing the number of blocks on the command line
for mke2fs and resize2fs, and use this function so that filesystem size
inputs to e2fsprogs command line programs are parsed consistently.
2005-01-05 03:01:06 -05:00
Theodore Ts'o 522798d342 Add install-strip and install-shlibs-strip targets
Use Linux-kernel-style makefile output for "make install"

Update intl/Makefile.in to version from gettext 0.14.1
2004-12-15 11:28:55 -05:00
Theodore Ts'o 6d4022786d Use MKINSTALLDIRS macro so that the Makefiles can find the script
correctly.

Update Makefile dependencies.

Update "make depend" production so that it filters out comments
inserted by newer gcc compilers.

Remove sync from e2fsck's "make all" target.
2004-12-14 21:46:26 -05:00
Theodore Ts'o 47204ff983 Use Linux-kernel-style makefile output to make it easier to
see errors/warnings.
2004-11-30 10:52:27 -05:00
Theodore Ts'o dd60705665 Refine the build process to avoid re-running subst all the time on
some generated files, by having subst update the modtime on these 
files even when the generated file hasn't changed.  We do this with 
generated files that do not have any downstream dependencies.
2004-04-03 13:53:46 -05:00
Theodore Ts'o a04eba3f88 Update to gettext 0.11.5. We now enable NLS support by default.
Fixed up support for using the internal intl library.
2003-05-03 16:35:17 -04:00
Theodore Ts'o afb6d709ba Use DYLD_LIBRAY_PATH so that "make check" works on
Darwin systems when building with shared libraries.
2003-04-21 16:12:34 -04:00
Theodore Ts'o 482afc442d Makefile.in (install): Search all compression extensions when
deleting old man pages.
2002-10-31 03:32:34 -05:00
Theodore Ts'o 304905df4a Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
(From Philipp Thomas <pthomas@suse.de>)
2002-03-07 20:55:01 -05:00
Theodore Ts'o b9f409255e Update makefiles to install mkfs.ext3, and to install man pages for
mkfs.ext2/3 and fsck.ext2/3.  Also remove any compressed man pages
before installing the man pages.
2002-02-24 03:08:57 -05:00
Theodore Ts'o 797f5ef14e ChangeLog, wordwrap.pl:
Makefile.in: Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
  wordwrap.pl: Add some rules which help fix up the dependencies.
Many files:
  Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
2001-06-01 23:49:46 +00:00
Theodore Ts'o 54c637d4d2 Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2image.c, findsuper.c, lsattr.c,
  	mke2fs.c, mklost+found.c, tune2fs.c, util.c: Change location of
  	ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, resize2fs.h:
  resize2fs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, debugfs.h:
  debugfs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, e2fsck.h, scantest.c:
  e2fsck.h, scantest.c: Change location of ext2_fs.h to be
  	ext2fs/ext2_fs.h
ChangeLog, Makefile.in, tst_uuid.c, uuid_time.c:
  tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h
ChangeLog, Makefile.in, e2p.h:
  e2p.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, test_icount.c, test_rel.c:
  test_icount.c, test_rel.c: Change location of ext2_fs.h to be
  	ext2fs/ext2_fs.h
2001-05-14 11:45:38 +00:00
Theodore Ts'o a05c589a5e Makefile.in:
Update makefile dependencies
2001-01-18 02:37:21 +00:00
Theodore Ts'o 0e8a9560d8 Many files:
jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h.  The jfs.h file has
  	been moved to the include/linux directory.
  journal.c, revoke.c, recovery.c: Updated files from Stephen to support
  	the V2 superblock and revoke processing.  The journal.c and revoke.c
  	files are copies from the ext3 kernel source.
  Makefile.in: Added revoke.c to the list of source/object files.
Makefile.in:
  Fix up some mistakes in the source file list, and regenerate the
  dependencies.
  Update Makefile dependencies.
ChangeLog, jfs.h:
  jfs.h: Remove excess #include of JFS_DEBUG.  Not needed for e2fsprogs,
  	since we optioanlly define it in the configuration file system.
2000-12-09 06:41:25 +00:00
Theodore Ts'o 3e377db294 ChangeLog, MCONFIG.in, Makefile.in, Makefile.in.in:
Fix so that top-level "make check" works correctly.
e2image.c:
  Fix program name for e2image.
2000-12-09 02:37:33 +00:00
Theodore Ts'o e4c8e885d2 ChangeLog, Makefile.in:
Makefile.in (install): Install resize2fs in /sbin, not /usr/sbin.
ChangeLog, unix.c:
  unix.c: Also, re-arrange the logic so that we do the time check only
  	after doing the percentage check, and we only advance the spinner if
  	we're about to display it.
ChangeLog:
  Fix minor wording error in Chagelog.
2000-07-05 23:54:46 +00:00
Theodore Ts'o 0cee8a5c42 Many files:
Update copyright of files in preparation for release of resize2fs.
  	Also removed the (obsolete) beta-test check that had been in the code,
  	as well as the old spec files used to package the separate
  	distribution of resize2fs.
  Makefile.in: No longer build resize2fs.static, since there's no real
  point in it any more.
  Modified Files:
  	ChangeLog Makefile.in extent.c main.c resize2fs.8.in
  	resize2fs.c resize2fs.h sim_progress.c test_extent.c
  Removed Files:
  	e2fsprogs-1.12.spec pq.gif resize2fs.spec version.h
2000-04-06 21:38:34 +00:00
Theodore Ts'o 5c36a2f85b ChangeLog, Makefile.in:
Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
  	source directory.  Also, when making the .exclude file for the
  	source_tar_file, exclude those two files as well.
  Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
  	source directory.
1999-11-19 18:42:30 +00:00
Theodore Ts'o 790a0ad4d5 Makefile.in:
Add resize2fs.clean to the clean list.
1999-07-19 16:16:12 +00:00
Theodore Ts'o 45a676b5f1 Makefile.in:
Update dependencies.
ChangeLog:
  Update ChangeLog to reflect full set of changes to configure.in
1999-07-03 20:45:28 +00:00
Theodore Ts'o dba838b09e ChangeLog, Makefile.in:
Makefile.in: Updated dependencies.
1998-12-04 06:15:12 +00:00
Theodore Ts'o d171c5b5ee ChangeLog, subst.conf.in:
Add substitution for @datadir@
ChangeLog, Makefile.in:
  Change to use new installation directory variables convention.  Fix
  uninstall rules to take $(DESTDIR) into account.  Remove cat8dir from
  the installdirs target, since modern man package don't necessarily put
  the cat directory in /usr/man/cat?.
ChangeLog, .del-types.h.in~7a460879:
  types.h.in: Add a signed keyword to the __s64 definition.
1998-04-03 16:07:06 +00:00
Theodore Ts'o fac9c206e7 Makefile.in, ChangeLog:
Change the name of the complete source file that we built (that
  includes resize2fs) to be e2fsprogs-ALL-<version>.tar.gz.  Don't link
  with libuuid, since it's not needed.
resize2fs.8.in:
  Add copyright statement.
Many files:
  Update packaging for the resize2fs program.
1998-03-07 23:36:45 +00:00
Theodore Ts'o 0e14f78e66 ChangeLog, Makefile.in, main.c:
Makefile.in: Add rule to build a static version of resize2fs.  Update
  	dependency rules.
  main.c: #include ../version.h, instead of using a hard-coded version
  	string.
1998-02-27 06:04:23 +00:00
Theodore Ts'o a8519a2dbe Many files:
Major reoganization of how resizing works.  Functions in
  ext2_block_move.c, and ext2_inode_move.c moved into resize2fs.c.
  Multiple passes in those two files also combined into a single inode
  scanning pass.  Made the inode table moving function better handling
  the case where it needs to abort mid-operation.  When moving blocks
  around, made the block allocation function preferentially avoid the
  old group descriptor blocks, to make resize2fs more robust.
1998-02-16 22:16:20 +00:00
Theodore Ts'o d40259fd55 Many files:
Rename io.h to be ext2_io.h (avoid namespace collisions)
ChangeLog, resize2fs.h:
  Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H.
1997-10-20 00:44:26 +00:00
Theodore Ts'o 44339bdff8 Many files:
Use new substitution technology which doesn't depend on shell scripts.
  (Faster, and better for MS-DOS port!)
1997-10-15 02:47:20 +00:00
Theodore Ts'o 8e74e66983 Makefile.in, .del-e2fsprogs-1.11.spec~42cd069e, resize2fs.h:
Fix up for release
1997-06-17 05:36:04 +00:00
Theodore Ts'o c762c8e632 Many files:
Checkin of work to date.  (Pretty much completely working now.)
1997-06-17 03:52:12 +00:00
Theodore Ts'o 052db4b76e Makefile.in, .del-inodemap.c~24510e64, main.c, resize2fs.c, resize2fs.h:
New snapshot (almost fully functional)
1997-06-12 07:14:32 +00:00
Theodore Ts'o 1e1da29fbd Many files:
bmove.c (ext2fs_move_blocks): New function which takes a bitmap of
  	blocks which need to be moved, and moves those blocks to another
  	location in the filesystem.
  rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a bitmap,
  	make sure all of the new parts of the bitmap are zero.
  bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap wasn't
  	being returned to the caller.
  alloc_tables.c (ext2fs_allocate_group_table): Add new function
  	ext2fs_allocate_group_table() which sets the group tables for a
  	particular block group.  The relevant code was factored out of
  	ext2fs_allocate_tables().
  dblist.c (make_dblist): Adjust the initial size of the directory block
  	list to be a bit more realize (ten plus twice the number of
  	directories in the filesystem).
  Check in interim work.
1997-06-09 14:51:29 +00:00
Theodore Ts'o 24b2c7a7a1 ChangeLog, Makefile.in, configure.in:
configure.in (rmakefile): Added (optional) private directory for resize2fs.
  Makefile.in: Change recursive descent rules to check to see if a
  	directory exists before trying to make it.
Many files:
  Initial checkin of work done to date.
1997-06-07 20:42:58 +00:00