This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 857717 - /etc/.java/.systemPrefs directory missing breaks Banco do Brasil online banking
/etc/.java/.systemPrefs directory missing breaks Banco do Brasil online banking
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Omair Majid
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-16 09:51 EDT by Cesar Eduardo Barros
Modified: 2013-06-11 05:01 EDT (History)
4 users (show)

See Also:
Fixed In Version: java-1.7.0-openjdk-1.7.0.19-2.3.9.8.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-09 23:23:33 EDT
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)

  None (edit)
Description Cesar Eduardo Barros 2012-09-16 09:51:03 EDT
Description of problem:

This is the same problem as bug 741821, but this time with openjdk 1.7. Also, two extra files should be created to avoid warnings.

The Banco do Brasil (http://www.bb.com.br/) online banking depends on a Java "security module" (módulo de segurança), which runs as an applet within the browser. This "security module" fails to load unless an /etc/.java/.systemPrefs directory is created.

Apparently, it is the preferences code within the Java runtime library that breaks if this directory does not exist. Creating this directory (nothing more than a simple "sudo mkdir -p /etc/.java/.systemPrefs") is enough to fix the problem.

To prevent this hard-to-diagnose problem on an important use case, this directory should be created by default.

Creating an empty directory works, but causes some warnings. This time, I ran a simple test program as root after creating the empty directory, which created the two empty files which need to exist to prevent the warnings. The empty files are:

/etc/.java/.systemPrefs/.systemRootModFile
/etc/.java/.systemPrefs/.system.lock


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

java-1.7.0-openjdk-1.7.0.6-2.3.1.fc17.2.x86_64

How reproducible:

Every time.

Steps to Reproduce:

See bug 741821.
  
Actual results:

See bug 741821.

Expected results:

See bug 741821.

Additional info:

After creating the empty directory by hand (sudo mkdir -p /etc/.java/.systemPrefs), I ran the following test program as root:

import java.util.prefs.Preferences;

class SystemPreferences {
	public static void main(String[] args) {
		Preferences prefs = Preferences.systemRoot();
	}
}

This creates two extra empty hidden files in the hidden directory, which prevents warnings (run it as a normal user before creating the empty hidden files to see the warnings). Thus, to make it work perfectly (without any warnings), the following directories and files need to be created:

drwxr-xr-x. 3 root root 4096 Set 16 10:27 /etc/.java
drwxr-xr-x. 2 root root 4096 Set 16 10:28 /etc/.java/.systemPrefs
-rw-r--r--. 1 root root    0 Set 16 10:28 /etc/.java/.systemPrefs/.system.lock
-rw-r--r--. 1 root root    0 Set 16 10:28 /etc/.java/.systemPrefs/.systemRootModFile

The same should apply to java-1.6.0-openjdk.

I noticed during a strace that it might be able to use the .systemPrefs from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/.systemPrefs instead. I did not investigate further; if it works, this might be an alternative to creating /etc/.java/.systemPrefs.
Comment 1 Cesar Eduardo Barros 2012-09-16 09:56:07 EDT
Found more information:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4751177

"System prefs are normally rooted at /etc/.java/.systemPrefs in a "local install", or <java.home>/.systemPrefs in a "network install.""

It seems the correct option is to use /etc/.java/.systemPrefs, so the sysadmin can change them if needed.
Comment 2 Fedora Update System 2013-06-08 03:56:52 EDT
java-1.7.0-openjdk-1.7.0.19-2.3.9.12.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.19-2.3.9.12.fc19
Comment 3 Fedora Update System 2013-06-08 03:57:07 EDT
java-1.7.0-openjdk-1.7.0.19-2.3.9.8.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.19-2.3.9.8.fc18
Comment 4 Fedora Update System 2013-06-08 03:57:18 EDT
java-1.7.0-openjdk-1.7.0.19-2.3.9.6.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.19-2.3.9.6.fc17
Comment 5 Fedora Update System 2013-06-08 14:05:54 EDT
Package java-1.7.0-openjdk-1.7.0.19-2.3.9.12.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing java-1.7.0-openjdk-1.7.0.19-2.3.9.12.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10379/java-1.7.0-openjdk-1.7.0.19-2.3.9.12.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-06-09 23:23:33 EDT
java-1.7.0-openjdk-1.7.0.19-2.3.9.12.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2013-06-11 04:57:31 EDT
java-1.7.0-openjdk-1.7.0.19-2.3.9.6.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2013-06-11 05:01:31 EDT
java-1.7.0-openjdk-1.7.0.19-2.3.9.8.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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