RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1446700 - OpenJDK 7 native2ascii always creates an output file with file permission 600
Summary: OpenJDK 7 native2ascii always creates an output file with file permission 600
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.7.0-openjdk
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-28 15:56 UTC by Masafumi Miura
Modified: 2020-06-11 13:43 UTC (History)
5 users (show)

Fixed In Version: java-1.7.0-openjdk-1.7.0.141-2.6.10.4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 07:31:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2287 0 normal SHIPPED_LIVE java-1.7.0-openjdk bug fix and enhancement update 2017-08-01 11:26:51 UTC
openjdk bug system JDK-7177216 0 None None None 2017-05-17 16:37:53 UTC

Description Masafumi Miura 2017-04-28 15:56:04 UTC
### Description of problem:

OpenJDK 7 native2ascii always creates an output file with file permission 600. It should follow umask setting.

A same issue was reported in JDK bug database and already fixed: 

    https://bugs.openjdk.java.net/browse/JDK-7177216
    http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/819258b5002e
    http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/e50c9a5f001c
    http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386

Note that this issue does not exist in OpenJDK 6 and OpenJDK on RHEL 7 but it exists in OpenJDK 7 on RHEL 7. As far as I checked source code in src rpm, it looks OpenJDK 7 does not contain the above fix. Please backport the fix.


### Version-Release number of selected component (if applicable):

java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64
java-1.7.0-openjdk-devel-1.7.0.131-2.6.9.0.el7_3.x86_64


### How reproducible:

Anytime


### Steps to Reproduce:

1. Create an input file:

    touch inputfile-test.txt

2. Execute OpenJDK 7's native2ascii against the file:

    /usr/lib/jvm/java-1.7.0-openjdk/bin/native2ascii inputfile-test.txt outputfile-test.txt

3. Check the files' permissions:

    ls -l inputfile-test.txt outputfile-test.txt


### Actual results:

The permission of the output file does not follow umask setting. It's always 600.


### Expected results:

The permission of the output file should follow umask setting. For example, if umask is 022, it should be 644.

Comment 1 Masafumi Miura 2017-04-28 15:59:19 UTC
> Note that this issue does not exist in OpenJDK 6 and OpenJDK on RHEL 7 but
> it exists in OpenJDK 7 on RHEL 7. 

Correction. I meant "Note that this issue does not exist in OpenJDK 6 and OpenJDK **8** on RHEL 7 but it exists in OpenJDK 7 on RHEL 7."

Comment 2 Andrew John Hughes 2017-05-04 16:42:33 UTC
Confirmed:

$  ls -l inputfile-test.txt outputfile-test.txt
-rw-r--r-- 1 andrew users 0 May  4 17:41 inputfile-test.txt
-rw------- 1 andrew users 0 May  4 17:41 outputfile-test.txt

Comment 7 errata-xmlrpc 2017-08-01 07:31:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2287


Note You need to log in before you can comment on or make changes to this bug.