Lines Matching refs:entry

53 	if (entry->name_length == 14) {  in ZEND_INI_MH()
74 if (entry->name_length == 14) { in ZEND_INI_MH()
83 if (entry->name_length == 14) { in ZEND_INI_MH()
338 phar_entry_info *entry = (phar_entry_info *) pDest; in phar_tmpclose_apply() local
340 if (entry->fp_type != PHAR_TMP) { in phar_tmpclose_apply()
344 if (entry->fp && !entry->fp_refcount) { in phar_tmpclose_apply()
345 php_stream_close(entry->fp); in phar_tmpclose_apply()
346 entry->fp = NULL; in phar_tmpclose_apply()
382 phar_entry_info *entry = (phar_entry_info *)pDest; in destroy_phar_manifest_entry() local
385 if (entry->cfp) { in destroy_phar_manifest_entry()
386 php_stream_close(entry->cfp); in destroy_phar_manifest_entry()
387 entry->cfp = 0; in destroy_phar_manifest_entry()
390 if (entry->fp) { in destroy_phar_manifest_entry()
391 php_stream_close(entry->fp); in destroy_phar_manifest_entry()
392 entry->fp = 0; in destroy_phar_manifest_entry()
395 if (entry->metadata) { in destroy_phar_manifest_entry()
396 if (entry->is_persistent) { in destroy_phar_manifest_entry()
397 if (entry->metadata_len) { in destroy_phar_manifest_entry()
399 free(entry->metadata); in destroy_phar_manifest_entry()
401 zval_internal_ptr_dtor(&entry->metadata); in destroy_phar_manifest_entry()
404 zval_ptr_dtor(&entry->metadata); in destroy_phar_manifest_entry()
406 entry->metadata_len = 0; in destroy_phar_manifest_entry()
407 entry->metadata = 0; in destroy_phar_manifest_entry()
410 if (entry->metadata_str.c) { in destroy_phar_manifest_entry()
411 smart_str_free(&entry->metadata_str); in destroy_phar_manifest_entry()
412 entry->metadata_str.c = 0; in destroy_phar_manifest_entry()
415 pefree(entry->filename, entry->is_persistent); in destroy_phar_manifest_entry()
417 if (entry->link) { in destroy_phar_manifest_entry()
418 pefree(entry->link, entry->is_persistent); in destroy_phar_manifest_entry()
419 entry->link = 0; in destroy_phar_manifest_entry()
422 if (entry->tmp) { in destroy_phar_manifest_entry()
423 pefree(entry->tmp, entry->is_persistent); in destroy_phar_manifest_entry()
424 entry->tmp = 0; in destroy_phar_manifest_entry()
666 phar_entry_info entry; local
1063 memset(&entry, 0, sizeof(phar_entry_info));
1064 entry.phar = mydata;
1065 entry.fp_type = PHAR_FP;
1066 entry.is_persistent = mydata->is_persistent;
1073 PHAR_GET_32(buffer, entry.filename_len);
1075 if (entry.filename_len == 0) {
1079 if (entry.is_persistent) {
1080 entry.manifest_pos = manifest_index;
1083 if (entry.filename_len > endbuffer - buffer - 24) {
1087 …if ((manifest_ver & PHAR_API_VER_MASK) >= PHAR_API_MIN_DIR && buffer[entry.filename_len - 1] == '/…
1088 entry.is_dir = 1;
1090 entry.is_dir = 0;
1093 phar_add_virtual_dirs(mydata, buffer, entry.filename_len TSRMLS_CC);
1094 entry.filename = pestrndup(buffer, entry.filename_len, entry.is_persistent);
1095 buffer += entry.filename_len;
1096 PHAR_GET_32(buffer, entry.uncompressed_filesize);
1097 PHAR_GET_32(buffer, entry.timestamp);
1100 mydata->min_timestamp = entry.timestamp;
1101 mydata->max_timestamp = entry.timestamp;
1103 if (mydata->min_timestamp > entry.timestamp) {
1104 mydata->min_timestamp = entry.timestamp;
1105 } else if (mydata->max_timestamp < entry.timestamp) {
1106 mydata->max_timestamp = entry.timestamp;
1110 PHAR_GET_32(buffer, entry.compressed_filesize);
1111 PHAR_GET_32(buffer, entry.crc32);
1112 PHAR_GET_32(buffer, entry.flags);
1114 if (entry.is_dir) {
1115 entry.filename_len--;
1116 entry.flags |= PHAR_ENT_PERM_DEF_DIR;
1120 if (entry.is_persistent) {
1121 entry.metadata_len = len;
1123 entry.metadata_len = 0;
1126 pefree(entry.filename, entry.is_persistent);
1129 if (phar_parse_metadata(&buffer, &entry.metadata, len TSRMLS_CC) == FAILURE) {
1130 pefree(entry.filename, entry.is_persistent);
1135 entry.offset = entry.offset_abs = offset;
1136 offset += entry.compressed_filesize;
1138 switch (entry.flags & PHAR_ENT_COMPRESSION_MASK) {
1141 if (entry.metadata) {
1142 if (entry.is_persistent) {
1143 free(entry.metadata);
1145 zval_ptr_dtor(&entry.metadata);
1148 pefree(entry.filename, entry.is_persistent);
1154 if (entry.metadata) {
1155 if (entry.is_persistent) {
1156 free(entry.metadata);
1158 zval_ptr_dtor(&entry.metadata);
1161 pefree(entry.filename, entry.is_persistent);
1166 if (entry.uncompressed_filesize != entry.compressed_filesize) {
1167 if (entry.metadata) {
1168 if (entry.is_persistent) {
1169 free(entry.metadata);
1171 zval_ptr_dtor(&entry.metadata);
1174 pefree(entry.filename, entry.is_persistent);
1180 manifest_flags |= (entry.flags & PHAR_ENT_COMPRESSION_MASK);
1182 entry.is_crc_checked = (manifest_flags & PHAR_HDR_SIGNATURE ? 1 : 0);
1183 phar_set_inode(&entry TSRMLS_CC);
1184 …zend_hash_add(&mydata->manifest, entry.filename, entry.filename_len, (void*)&entry, sizeof(phar_en…
2248 …onst char *filename, int filename_len, char **arch, int *arch_len, char **entry, int *entry_len, i… argument
2297 *entry = estrndup(ext_str+ext_len, *entry_len);
2299 phar_unixify_path_separators(*entry, *entry_len);
2301 *entry = phar_fix_filepath(*entry, entry_len, 0 TSRMLS_CC);
2304 *entry = estrndup("/", 1);
2403 phar_entry_info *entry = idata->internal_file; local
2409 if (entry->is_zip && process_zip > 0) {
2415 … archive \"%s\" to verify local file header for file \"%s\"", idata->phar->fname, entry->filename);
2418 …php_stream_seek(phar_get_entrypfp(idata->internal_file TSRMLS_CC), entry->header_offset, SEEK_SET);
2422 …phar \"%s\" (cannot read local file header for file \"%s\")", idata->phar->fname, entry->filename);
2429 entry->header_offset + sizeof(local) +
2432 entry->compressed_filesize, SEEK_SET);
2435 … \"%s\" (cannot read local data descriptor for file \"%s\")", idata->phar->fname, entry->filename);
2446entry->filename_len != PHAR_ZIP_16(local.filename_len) || entry->crc32 != PHAR_ZIP_32(local.crc32)…
2447 …cal header of file \"%s\" does not match central directory)", idata->phar->fname, entry->filename);
2452 entry->offset = entry->offset_abs =
2453 …sizeof(local) + entry->header_offset + PHAR_ZIP_16(local.filename_len) + PHAR_ZIP_16(local.extra_l…
2455 if (idata->zero && idata->zero != entry->offset_abs) {
2456 idata->zero = entry->offset_abs;
2473 entry->is_crc_checked = 1;
2476 …l corruption of phar \"%s\" (crc32 mismatch on file \"%s\")", idata->phar->fname, entry->filename);
2496 phar_entry_info *entry = (phar_entry_info *)data; local
2498 if (entry->fp_refcount <= 0 && entry->is_deleted) {
2564 phar_entry_info *entry, *newentry; local
2752 if (zend_hash_get_current_data(&phar->manifest, (void **)&entry) == FAILURE) {
2755 if (entry->cfp) {
2757 php_stream_close(entry->cfp);
2758 entry->cfp = 0;
2760 if (entry->is_deleted || entry->is_mounted) {
2764 if (!entry->is_modified && entry->fp_refcount) {
2766 switch (entry->fp_type) {
2778 phar_add_virtual_dirs(phar, entry->filename, entry->filename_len TSRMLS_CC);
2780 if (entry->is_dir) {
2784 if (entry->metadata) {
2785 if (entry->metadata_str.c) {
2786 smart_str_free(&entry->metadata_str);
2788 entry->metadata_str.c = 0;
2789 entry->metadata_str.len = 0;
2791 php_var_serialize(&entry->metadata_str, &entry->metadata, &metadata_hash TSRMLS_CC);
2794 if (entry->metadata_str.c) {
2795 smart_str_free(&entry->metadata_str);
2797 entry->metadata_str.c = 0;
2798 entry->metadata_str.len = 0;
2802 …offset += 4 + entry->filename_len + sizeof(entry_buffer) + entry->metadata_str.len + (entry->is_di…
2805 if ((oldfile && !entry->is_modified) || entry->is_dir) {
2806 if (entry->fp_type == PHAR_UFP) {
2808 entry->fp_type = PHAR_FP;
2812 if (!phar_get_efp(entry, 0 TSRMLS_CC)) {
2814 newentry = phar_open_jit(phar, entry, error TSRMLS_CC);
2821 entry = newentry;
2823 file = phar_get_efp(entry, 0 TSRMLS_CC);
2824 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 1 TSRMLS_CC)) {
2830 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
2835 mytime = entry->uncompressed_filesize;
2839 entry->crc32 = ~newcrc32;
2840 entry->is_crc_checked = 1;
2841 if (!(entry->flags & PHAR_ENT_COMPRESSION_MASK)) {
2843 entry->compressed_filesize = entry->uncompressed_filesize;
2846 filter = php_stream_filter_create(phar_compress_filter(entry, 0), NULL, 0 TSRMLS_CC);
2852 if (entry->flags & PHAR_ENT_COMPRESSED_GZ) {
2854 …spprintf(error, 0, "unable to gzip compress file \"%s\" to new phar \"%s\"", entry->filename, phar…
2858 …spprintf(error, 0, "unable to bzip2 compress file \"%s\" to new phar \"%s\"", entry->filename, pha…
2867 entry->cfp = php_stream_fopen_tmpfile();
2868 if (!entry->cfp) {
2879 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) {
2885 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
2889 php_stream_filter_append((&entry->cfp->writefilters), filter);
2890 …if (SUCCESS != php_stream_copy_to_stream_ex(file, entry->cfp, entry->uncompressed_filesize, NULL))…
2896 … compressed file contents of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
2901 php_stream_flush(entry->cfp);
2903 php_stream_seek(entry->cfp, 0, SEEK_END);
2904 entry->compressed_filesize = (php_uint32) php_stream_tell(entry->cfp);
2906 php_stream_rewind(entry->cfp);
2907 entry->old_flags = entry->flags;
2908 entry->is_modified = 1;
2909 global_flags |= (entry->flags & PHAR_ENT_COMPRESSION_MASK);
2995 if (zend_hash_get_current_data(&phar->manifest, (void **)&entry) == FAILURE) {
2999 if (entry->is_deleted || entry->is_mounted) {
3004 if (entry->is_dir) {
3006 phar_set_32(entry_buffer, entry->filename_len + 1);
3008 phar_set_32(entry_buffer, entry->filename_len);
3012 || entry->filename_len != php_stream_write(newfile, entry->filename, entry->filename_len)
3013 || (entry->is_dir && 1 != php_stream_write(newfile, "/", 1))) {
3019 if (entry->is_dir) {
3020 …le to write filename of directory \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->f…
3022 …"unable to write filename of file \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->f…
3038 phar_set_32(entry_buffer, entry->uncompressed_filesize);
3040 phar_set_32(entry_buffer+8, entry->compressed_filesize);
3041 phar_set_32(entry_buffer+12, entry->crc32);
3042 phar_set_32(entry_buffer+16, entry->flags);
3043 phar_set_32(entry_buffer+20, entry->metadata_str.len);
3046 …|| entry->metadata_str.len != php_stream_write(newfile, entry->metadata_str.c, entry->metadata_str…
3054 … write temporary manifest of file \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->f…
3083 if (zend_hash_get_current_data(&phar->manifest, (void **)&entry) == FAILURE) {
3087 if (entry->is_deleted || entry->is_dir || entry->is_mounted) {
3091 if (entry->cfp) {
3092 file = entry->cfp;
3095 file = phar_get_efp(entry, 0 TSRMLS_CC);
3096 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) {
3102 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
3114 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
3120 entry->offset = entry->offset_abs = offset;
3121 offset += entry->compressed_filesize;
3122 if (php_stream_copy_to_stream_ex(file, newfile, entry->compressed_filesize, &wrote) == FAILURE) {
3130 …spprintf(error, 0, "unable to write contents of file \"%s\" to new phar \"%s\"", entry->filename, …
3136 entry->is_modified = 0;
3138 if (entry->cfp) {
3139 php_stream_close(entry->cfp);
3140 entry->cfp = NULL;
3143 if (entry->fp_type == PHAR_MOD) {
3145 if (entry->fp_refcount == 0 && entry->fp != phar->fp && entry->fp != phar->ufp) {
3146 php_stream_close(entry->fp);
3149 entry->fp = NULL;
3150 entry->fp_type = PHAR_FP;
3151 } else if (entry->fp_type == PHAR_UFP) {
3152 entry->fp_type = PHAR_FP;
3176 …ite contents of file \"%s\" to new phar \"%s\" with requested hash type", entry->filename, phar->f…