Commit Graph

66 Commits

Author SHA1 Message Date
Greg Beaver
99ce24d6f4 MFB: fix setting of 32-bit values on big-endian systems 2009-02-15 18:52:11 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Antony Dovgal
79ec5dc2b9 fix ZTS build 2008-10-12 21:09:10 +00:00
Greg Beaver
c448cb165c MFB: add tests for copy-on-write support
- fix metadata handling with cached phars
 - fix virtual_dirs with rmdir
 - ensure that after copy-on-write, all existing Phar objects link to the newly copied phar data
2008-10-12 19:40:30 +00:00
Greg Beaver
8db86ad19e MFB: fix minor issues found by ICC (unused variables and the like) 2008-09-13 22:31:18 +00:00
Steph Fox
cd011d1e9a - MFB 2008-08-31 20:54:28 +00:00
Steph Fox
c6aa379d74 - This is as good as it gets in HEAD at present (~30% tests fail here) 2008-08-01 13:45:06 +00:00
Greg Beaver
ca6d36efb8 MFB: refactor function names for clarity. No functionality change 2008-05-30 22:39:33 +00:00
Steph Fox
76a9ec377b - MFB major fixes
* found felipe's segfault in util.c and fixed the segfault (3 tests fail due to odd behavior of . and .. on this machine)
   * fixed serious flaws in the setting/resetting of is_data - now it works properly.  Assume
     all new PharData are tar-based, and allow passing Phar::ZIP to PharData constructor to override this
   * fix broken earlier commit, introduced segfault that broke 20 tests here
2008-05-24 14:18:31 +00:00
Steph Fox
bdca5a12b0 - MFB fix offset detection in tar files 2008-05-24 13:59:56 +00:00
Greg Beaver
25b8e6cc3f MFB: add full metadata support for tar-based archives and test 2008-05-15 23:46:54 +00:00
Greg Beaver
82dc03941a fix weird alias issues, add tests to check for new-found problems 2008-05-12 20:42:07 +00:00
Greg Beaver
25a6be6cde fix windows build 2008-05-08 03:10:18 +00:00
Greg Beaver
53e02373d0 fix handling of mounted entries when flushing in all phars, and of deleted entries with open references in tar-based phars, do not extract mounted entries, add to test 2008-05-08 02:58:45 +00:00
Greg Beaver
0773c7f6a2 fix tar extension detection in open code 2008-05-07 17:35:20 +00:00
Greg Beaver
f134a909c3 optimize phar filename extension detection to first search through known phars. This eliminates several stat/realpath calls for archives with lots of files 2008-05-07 17:24:22 +00:00
Greg Beaver
5ba8ca70a4 fix alias overloading handling for archives that are not in use 2008-05-06 21:14:53 +00:00
Greg Beaver
7220c19556 fix tar generation - we were subtly corrupting the header with \0 because of use of strcpy 2008-04-28 16:44:53 +00:00
Greg Beaver
ff90f59ea9 fix off-by-one for writing of timestamp and file modes in tar files 2008-04-28 06:49:56 +00:00
Greg Beaver
5bf3d1d362 fix invalid free 2008-04-27 07:04:56 +00:00
Greg Beaver
11c93b8494 add checking for invalid alias on opening tar, and test 2008-04-26 22:31:44 +00:00
Greg Beaver
7c7b387cc3 fix potentially serious security issue: buffer overrun if the tar filename > 101 characters in length. This fixes tests/tar/bignames.phpt 2008-04-25 04:35:10 +00:00
Steph Fox
21584ed029 - kill a couple of (release build) MS compiler warnings 2008-04-24 16:59:23 +00:00
Greg Beaver
c4315bfb2b add test for huge filenames, fix huge filename reading 2008-04-21 06:33:49 +00:00
Greg Beaver
3d858f4aa9 implement symbolic link support within a tar-based phar archive
this also resulted in a major fix for mounted directories, which were recycling the 'link' field which
could cause stupid conflicts with actual links, so move that to new 'tmp' field.
2008-04-21 06:17:51 +00:00
Greg Beaver
ca6f70c8a3 add test for symbolic and hard links 2008-04-20 17:59:14 +00:00
Greg Beaver
027180d6ee new test for bad checksum, fix tar.c to catch tar archives with a corrupted first entry, fix memleak on bad checksum 2008-04-20 17:28:54 +00:00
Greg Beaver
6d421e13b0 fix truncation test 2008-04-20 16:58:08 +00:00
Greg Beaver
f5dbaf64fc add failing test for truncated tar archive 2008-04-20 15:12:09 +00:00
Greg Beaver
6cef8da201 move all blah++ to ++blah where possible for those with crapass compilers 2008-03-22 22:11:49 +00:00
Steph Fox
8343d7c139 - A bit more work on PharData creation/conversion.
- If readonly=0, why not $phardata->convertToPhar()?
- Known issue with directories creating 'as-file' copies within the archive (all formats)
@Greg/Marcus/Tony: This passes all tests on my box, 5.2/5.3/release_ts/debug_ts, and I can't find any more memleaks. Obviously this is too good to be true, so if conversion is still messy elsewhere please feel free to fix, or bug and assign to me.
2008-03-03 08:41:15 +00:00
Antony Dovgal
cd858fe243 fix segfault, comment out useless line 2008-02-29 13:56:46 +00:00
Steph Fox
001ffec19f Initial support for PharData object.
Note: two tests currently fail. IMHO we should be throwing E_ERROR on encountering a corrupted archive, not trying to throw a trail of exceptions...
New tests still to be written, not all functionality is in place yet.
2008-02-27 21:34:26 +00:00
Steph Fox
8513db73bb A bunch of stuff to do with filename conversion. Hopefully it won't sink the ship. 2008-02-24 22:29:06 +00:00
Greg Beaver
588f0660e9 free mounted_dirs on error to avoid memleak 2008-02-23 21:29:57 +00:00
Greg Beaver
2eb4db8d79 best fix for the bad logic in tar.c, now all tests pass that should 2008-02-23 18:17:48 +00:00
Greg Beaver
18444e3b5a revert previous changes to tar.c, fix incorrect user_stub == dummy check, now things work that should 2008-02-23 18:14:44 +00:00
Greg Beaver
a561228843 revert previous changes to tar.c, fix incorrect user_stub == dummy check, now things work that should 2008-02-23 18:09:31 +00:00
Greg Beaver
9d9bd2715a that !zend_hash_exists should be zend_hash_exists 2008-02-23 15:07:02 +00:00
Greg Beaver
a1828999c5 fix unfreed stuff when adding default stub 2008-02-23 15:05:05 +00:00
Steph Fox
eb7565451d s/zip/tar 2008-02-21 14:27:19 +00:00
Steph Fox
6cc2426ff1 A much better solution for setDefaultStub(). The convertTo*() fixes should be trivial now. 2008-02-21 00:24:38 +00:00
Greg Beaver
ba9fcf62fc add initial support for hashing mounted directories. Actual matching of mounted directories is not yet supported. 2008-02-18 04:45:42 +00:00
Steph Fox
87626d56d2 Fix ZTS build *nicely* 2008-02-18 04:42:04 +00:00
Greg Beaver
f72ce59e95 remove refcount hack to workaround zlib memleak fixed in zlib
intercepted file functions now fall through if the file is not found in the phar, this allows access to external libraries
actually use include_path for locating files for inclusion and in file_get_contents/fopen when include_path is requested.
This allows applications like Zend Framework MVC implementation to function properly
2008-02-13 15:00:31 +00:00
Greg Beaver
78e8eb3900 major refactoring of internal handling of aliases.
1) rename is_explicit_alias to is_temporary_alias for clarity and flip the value
2) fix setAlias so that it sets a permanent to-be-saved alias, and restores the old one on error
3) fix Phar constructor to work with sub-directories in RecursiveDirectoryIterator
2008-02-11 06:46:44 +00:00
Greg Beaver
3874e12ee5 fix 5.2 build 2008-02-11 04:48:58 +00:00
Greg Beaver
19df8a4d7f fix issues in opendir() with empty directories within a phar archive, port filterparams fix to tar.c 2008-02-08 05:57:40 +00:00
Greg Beaver
e3c64bd53b fix memory leaks. There are some leaks in libz that I can't fix, but none triggered in the current tests 2008-02-08 04:26:41 +00:00
Greg Beaver
67a9fd8783 fix mem leaks
strip trailing slash if present in a directory entry.  This code assumes that
tar_type is directory, as it must be to be a valid directory.
2008-02-08 01:06:12 +00:00