libzip: preserve permissions when extracting files
ClosedPublic

Authored by elvisangelaccio on Jun 27 2017, 2:04 PM.

Details

Summary

The zip format reserves the 2 leftmost bytes of the extended file
attribute field (32 bits) for the UNIX permissions.
If the zip archive was crated with such metadata, we can just use the
libzip api to retrieve the extended file attribute and extract the
mode_t value from it.

BUG: 381499
FIXED-IN: 17.07.80

Test Plan

This fixes the 2 failing libzip test cases in ExtractTest::testPreservePermissions().

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Ark. · View Herald TranscriptJun 27 2017, 2:04 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
This revision was automatically updated to reflect the committed changes.