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
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.7.0-openjdk (Show other bugs)
(Show other bugs)
Version: 7.4
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: Lukas Zachar
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-28 15:56 UTC by Masafumi Miura
Modified: 2017-08-01 07:31 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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 07:31:55 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
openjdk bug system JDK-7177216 None None None 2017-05-17 16:37 UTC
Red Hat Product Errata RHBA-2017:2287 normal SHIPPED_LIVE java-1.7.0-openjdk bug fix and enhancement update 2017-08-01 11:26:51 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.