Red Hat Bugzilla – Bug 1259309
Broken .bashrc if rebuilt as root
Last modified: 2017-08-01 14:15:18 EDT
Description of problem:
When abrt-java-connector is rebuilt as root, one of the tests run during %check phase causes /root/.bashrc to be overwritten with '*'.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rpmbuild --rebuild abrt-java-connector... as root
2. cat /root/.bashrc
modified /root/.bashrc (contains '*')
old file is kept
File test/Test.java contains:
* Attempt to write into a file which is not writable for given user.
File f = new File("/root/.bashrc");
FileOutputStream fos = new FileOutputStream(f);
Opened upstream pull request https://github.com/jfilak/abrt-java-connector/pull/46
Created attachment 1250195 [details]
Patch 1/2: Clearly state that tests cannot be run under root
Created attachment 1250196 [details]
Patch 2/2: Update tests for rhel-7.4
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.