Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/archival/libarchive/get_header_cpio.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/archival/libarchive/get_header_cpio.c
r3232 r3621 38 38 archive_handle->offset += 110; 39 39 40 if ( strncmp(&cpio_header[0], "07070", 5) != 040 if (!is_prefixed_with(&cpio_header[0], "07070") 41 41 || (cpio_header[5] != '1' && cpio_header[5] != '2') 42 42 ) { … … 53 53 bb_error_msg_and_die("damaged cpio file"); 54 54 file_header->mode = mode; 55 /* "cpio -R USER:GRP" support: */ 56 if (archive_handle->cpio__owner.uid != (uid_t)-1L) 57 uid = archive_handle->cpio__owner.uid; 58 if (archive_handle->cpio__owner.gid != (gid_t)-1L) 59 gid = archive_handle->cpio__owner.gid; 55 60 file_header->uid = uid; 56 61 file_header->gid = gid; … … 76 81 data_align(archive_handle, 4); 77 82 78 if (strcmp(file_header->name, "TRAILER!!!") == 0) {83 if (strcmp(file_header->name, cpio_TRAILER) == 0) { 79 84 /* Always round up. ">> 9" divides by 512 */ 80 85 archive_handle->cpio__blocks = (uoff_t)(archive_handle->offset + 511) >> 9;
Note:
See TracChangeset
for help on using the changeset viewer.