JDK-8250968 : Symlinks attributes not preserved when using jarsigner on zip files
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-08-03
  • Updated: 2023-12-04
  • Resolved: 2020-09-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16
11.0.10-oracleFixed 16 b15Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Description
After signing the files, symlinks are changing to 'file' type.
The jarsigner tool is used to sign zip files.

< │   ├── [-rw-r--r--]  lbuilder
< &#9474;   &#9500;&#9472;&#9472; [-rw-r--r--]  lcsscan
---
> │   ├── [lrwxrwxrwx]  lbuilder -> ../path/to/lbuilder
> &#9474;   &#9500;&#9472;&#9472; [-rwxr-xr-x]  lcsscan
Comments
Fix request (11u) Requesting backport of this fix for Oracle 11.0.10 parity. The change needed a few adaptations, 11u RFR thread to be found here: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-November/004119.html
12-11-2020

Changeset: 7686e871 Author: Sean Coffey <coffeys@openjdk.org> Date: 2020-09-07 19:01:07 +0000 URL: https://git.openjdk.java.net/jdk/commit/7686e871
07-09-2020

testing is simple enough but requires zip tool. create a keystore and key alias (testKey) create a file which is a link to another file/dir (sym.txt) zip -ry $ZIPFILE_NAME sym.txt $JDK_HOME/bin/jarsigner -storepass changeit -debug -keystore teststore $ZIPFILE_NAME testKey unzip $ZIPFILE_NAME -d $EXTRACT_DIR ls -l $EXTRACT_DIR original symbolic link should be preserved.
27-08-2020