Commit Graph

122 Commits (4f858546e1c3c452f400a34198b10cb7a1ed2760)

Author SHA1 Message Date
Theodore Ts'o 935a123f3b libss: Fix warn_unused_result warnings from gcc
Fixed a potential bug where by partial returns from the write system
call could the fallback pager to drop characters.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22 14:48:59 -04:00
Theodore Ts'o 9ea68828f3 libss: ss_execute_line: reflect any error codes from system() to the caller
This is primarily to silence a gcc warning, but it's better to reflect
the error from system() up to the caller.  In this case we don't
actually use it for anything, but that's OK.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22 14:46:48 -04:00
Jim Meyering 671326f625 libss: Avoid leak upon failed realloc in ss_add_request_table()
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-03-08 20:38:47 -04:00
Jim Meyering 45e338f533 remove useless if-before-free tests
In case you're wondering about whether this change is safe from a
portability standpoint, fear not.  This has been beaten to death
in other forums.  Here are a few threads:

  http://thread.gmane.org/gmane.comp.version-control.git/74187
  http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/12712
  http://thread.gmane.org/gmane.emacs.devel/98144
  http://thread.gmane.org/gmane.comp.lib.glibc.alpha/13092

There has been debate about whether it's a good idea from a
performance standpoint, too, but imho you'll have a hard time
finding an instance where this sort of change induces a
measurable performance penalty.  If you do, please let me know.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-03-08 20:37:12 -04:00
Theodore Ts'o 5299580c1c Use format strings directly to prevent -Werror=format-security failures
Gcc is too stupid to realize that:

    const char *usage="String which has no percent signs";

    com_err(progname, 0, usage);

is OK.  I refuse to bow to stupidity with:

   com_err(progname, 0, "%s", usage);

but I will use the string directly for the sake of people who like to
build with -Werror=format-security.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-20 13:05:25 -05:00
Theodore Ts'o 97be89b60b Fix pkg-config files: use Requires.private and fix the include directory
Addresses-Sourceforge-Bug: #2089537

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-02 21:20:44 -04:00
Theodore Ts'o efc6f628e1 Remove trailing whitespace for the entire source tree
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 23:07:54 -04:00
Theodore Ts'o f56aa6e6ee Don't assume that /bin/true is always in /bin
... because it isn't on MacOS X

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-14 17:47:52 -04:00
Theodore Ts'o 2a7bfe8353 Flush stdio buffers before calling setbuf()
On Solaris setbuf() will discard any pending output to the stream, so
make we call fflush() before calling setbuf().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13 16:06:57 -04:00
Theodore Ts'o 318824c1bb Fix Solaris shell script portability issues
Solaris ships with a pathetically ancient shell in /bin/sh,
so fix various shell scripts to accomodate.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13 16:06:56 -04:00
Theodore Ts'o 81f6857b15 Fix LIBSS dependency problem for tests/test_icount and lib/ss/test_ss
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07 22:19:52 -04:00
Theodore Ts'o a91b3f36dd Merge branch 'maint' 2008-04-17 16:32:28 -04:00
Theodore Ts'o 6a141f218e Fix non-POSIX ">&" in the Makefile for lib/ss's "make check" rule
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-09 15:40:43 -04:00
Theodore Ts'o fef2b38d8e Merge branch 'maint' into next
Conflicts:

	configure
	debian/rules
	e2fsck/swapfs.c
	lib/ext2fs/ext2_fs.h
2008-01-01 12:41:35 -05:00
Theodore Ts'o 0cfde3d15a libss: Remove unnecessary Makefile dependency for test_ss
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-01 01:19:19 -05:00
Theodore Ts'o b689b8dd14 Merge branch 'maint' into next
Conflicts:

	lib/ext2fs/closefs.c
2007-12-17 10:28:01 -05:00
Theodore Ts'o bef406047d libss: Fix "make check" test case to work portably
The "make check" test in lib/ss would fail if '.' is not in the user's
PATH, and if the libss shared library had not yet been installed yet.

Addresses-Sourceforge-Bug: #1848974

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-15 22:09:48 -05:00
Theodore Ts'o e6a4571eec Merge branch 'maint' into next
Conflicts:

	lib/ext2fs/closefs.c
2007-12-09 17:03:01 -05:00
Theodore Ts'o 1113bf706f libss: Fix parallel build failure
A missing dependency on ss_err.h meant that std_rqs.o could fail when
e2fsprogs was being built using make -j.

Thanks to Robert Kerr for reporting this bug.

Addresses-Sourceforge-Bug: #1842331

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-02 05:52:40 -05:00
Theodore Ts'o 33b92836cd Fix errors in test_ss.c so it can be an example application and test case
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-02 05:25:23 -05:00
Dmitry V. Levin 7b7370bd2e blkid.pc, ss.pc: Move private libs from "Libs:" to "Libs.private:"
According to pkg-config(1) manual page, private libraries should be
defined by "Libs.private:" line.  Private libraries are libraries which
are not exposed through our library, but are needed in the case of
static linking.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2007-11-01 00:32:32 -04:00
Theodore Ts'o 424a3e4a23 Remove Changelog files since they're not used after the git migration
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-08 08:50:41 -04:00
Theodore Ts'o 4b4df799f1 Make it clear in an error message that it is mk_cmds that is complaining
Obviates gentoo patch: e2fsprogs-1.32-mk_cmds-cosmetic.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-30 20:05:41 -04:00
Theodore Ts'o d7b64725ee Update Release Notes, Changelogs, version.h, etc. for 1.40 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-24 17:32:47 -04:00
Brian Behlendorf f19c46dfbc [COVERITY] Fix memory leak in libss (ss_execute_line)
Fix a memory leak by freeing the argv[] array if ss_parse_line returns 0
for argc 0 (which will happen if the user his return and sends an empty
line to the application).

Potentially need to free argv before early return since it was allocated
memory. Need to be careful since it may be possible for ss_parse() to have
freed the memory allocated to it if it detects an unbalanced set of quotes
passed to it.

Coverity ID: 21: Resource Leak

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2007-03-21 17:34:47 -04:00
Brian Behlendorf d2021de5cf [COVERITY] Fix bad error checking for NULL parameter in ss library
Looks like flawed reasoning.  Here if info_dir is NULL then you are
guaranteed to blow up since you will dereference it.  It seems like the
correct thing to do here (what the code author meant to do) was to set
*code_ptr = SS_ET_NO_INFO_DIR if info_dir was NULL or if *info_dir was
an empty string (aka *info_dir == '\0').

Coverity ID: 8: Forward Null

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2007-03-19 08:39:32 -04:00
Theodore Ts'o 83732f11d6 Add libreadline.so.5 to the list of readline libraries used by libss
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-17 22:56:23 -05:00
Theodore Ts'o 05155f9bff Set local environment variables to C so mk_cmds and compile_et always work
Addresses SourceForge Bug: #1532177

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-12 10:43:31 -05:00
Theodore Ts'o b6b65c3de4 Add datarootdir definition for compatibility with autoconf 2.60
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-22 00:14:26 -04:00
Andreas Dilger 3f5ef9642b Create the generated files read-only to remind developers not to edit them.
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-05 14:41:00 -04:00
Theodore Ts'o 3ded50b37c Address parallel build problem in the library Makefiles
Add a dependency to make sure that the subdirectories are created before 
creating all of the object files.

Addresses Sourceforge Bug: #1261553

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-10 22:23:01 -05:00
Theodore Ts'o 583d1f8328 Fix false positives from valgrind: prctl(PR_GET_DUMPABLE)
Pass in zero to the unusued arguments of prctl(PR_GET_DUMPABLE) to
avoid false positives from valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-07-25 11:36:43 -05:00
Theodore Ts'o 1f965c8d96 Update for e2fsprogs 1.38 release. 2005-06-30 20:06:45 -04:00
Theodore Ts'o 3af0a45628 Fix bug in the secure getenv function so that the ss library will corrently
honor the PAGER and SS_READLINE_PATH environtment variables, and the 
test_io io_manager in the ext2fs library honors the TEST_IO_LOGFILE,
TEST_IO_FLAGS, TEST_IO_BLOCK, and TEST_IO_READ_ABORT environment variables.
2005-05-08 02:15:02 -04:00
Theodore Ts'o 09f3eba28a Fix typo so that we actually ignore environment variables when gid != egid. 2005-04-16 13:56:03 -04:00
Theodore Ts'o 762c7c6510 Add paranoia checks into the blkid, ext2fs, and ss libraries to ignore
environment variables if the libraries are called from setuid or setguid 
programs, or if kernel believes that the process is not eligible to create
a core dump.  In addition, if the libc has __secure_getenv(), use it so that
the libc can also do any additional limitations regarding when libraries can
trust environment variables (i.e., to integrate with systems like SELinux 
and Posix capabilities).
2005-04-06 14:44:16 -04:00
Theodore Ts'o fd4b28efd3 Update for the e2fsprogs 1.37 release. 2005-03-21 22:37:03 -05:00
Theodore Ts'o 3eee5e9eed Update for release of e2fsprogs 1.36. 2005-02-05 18:26:03 -05:00
Theodore Ts'o b7aa0d653e Remove *.pc files on a "make distclean"
Remove emacs backup files in tests/Makefile on a "make clean"
2005-02-05 15:48:49 -05:00
Theodore Ts'o e644186542 Add pkg-config files to e2fsprogs's libraries. 2005-01-26 12:59:25 -05:00
Theodore Ts'o 8800c73835 Makefile.in: Fix the kernel compile-time echo commands to be
consistent and portable
2005-01-19 00:25:25 -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 2b5901d9c7 Remove the a.out DLL support, since it's been obsolete and unmaintained
for a long time now.
2004-11-19 17:06:47 -05:00
Theodore Ts'o 56eb4d4749 Remove XSI:isms for greater portability. (Addresses
Debian Bug #255589)
2004-09-17 19:54:22 -04:00
Theodore Ts'o aa5c0a4562 Remove .cvsignore files; they were out of date, and causes lintian
to flame about their presence in the source tarball.
2004-05-05 09:02:36 -04:00
Theodore Ts'o 434661f8d5 Patch from Brian Bergstrand to use the correct -fPIC flag for
Darwin in order to get rid of the compiler warning.
2004-02-29 22:46:49 -05:00
Theodore Ts'o b70b1167fe Update version number for e2fsprogs 1.35 release. 2004-02-28 10:52:35 -05:00
Theodore Ts'o 544349270e Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00