- Changed interception of internal syscalls on OSX
and malloc arena treatment
- Adapted the faketime wrapper shell script to set
the appropriate environment variables on OSX and
use gdate instead of date
- Added README.OSX to explain the OSX-specific
aspects of compiling and using libfaketime
needed to avoid a malloc recursion; dyld calls the libSystem
initializer, which calls malloc as the first caller; that uses
the arc4 randomizer, which calls gettimeofday... the call to fake_time
calls strptime_l, _strptime0, gmtsub, and boom, back at malloc.
pass one gettimeofday call to let the malloc succeed.
port libfaketime to macos and dyld.
1) _ftpl_time calls gettimeofday since real time() does so. needed
to avoid double adjustment.
2) reduce call stack: use time tptr and call fake_time instead of
calling time for faking other time calls.
3) provide MacOS makefile and README notes.
4) make posix realtime calls under ifdef; define for base port but not
MacOS.
* Create separate "install" and "uninstall" targets for meta files.
* Add meta file targets to the shortcut Makefile.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
* Create separate "install" and "uninstall" targets for man pages.
* Add man page targets to the shortcut Makefile.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
* Use variables for compiler and linker flags.
* Use variables for source/object files, library names and sonames.
* Use proper targets instead of phony targets to build the shared
libraries.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
* Move test suite related stuff from "src/" to "test/".
* Fix "test.sh" to search for libfaketime libraries in the right place.
* Split up Makefile into two separate Makefiles (one for the main
program and one for the test suite).
Test cases should go in another directory for the sake of clean code
separation. This will also facilitate the creation of proper Makefiles.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
This is especially advantageous if libfaketime is built from source as
there isn't another convenient way to do a clean uninstall.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
This is a standard used by almost all open source projects and allows
installing to different locations than the default location (which is
especially useful for packagers, e.g.) Switch to installing to
"/usr/local" by default, also. "/usr" should never be used as default
prefix.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>