Bug 1259309 - Broken .bashrc if rebuilt as root
Broken .bashrc if rebuilt as root
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: abrt-java-connector (Show other bugs)
7.1
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: abrt
Lukas Zachar
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-02 07:55 EDT by Lukas Zachar
Modified: 2017-08-01 14:15 EDT (History)
3 users (show)

See Also:
Fixed In Version: abrt-java-connector-1.0.6-12.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 14:15:18 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)
Patch 1/2: Clearly state that tests cannot be run under root (1.58 KB, patch)
2017-02-14 07:10 EST, Matej Habrnal
no flags Details | Diff
Patch 2/2: Update tests for rhel-7.4 (9.90 KB, patch)
2017-02-14 07:10 EST, Matej Habrnal
no flags Details | Diff

  None (edit)
Description Lukas Zachar 2015-09-02 07:55:06 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):
abrt-java-connector-1.0.6-6.el7

How reproducible:
always

Steps to Reproduce:
1. rpmbuild --rebuild abrt-java-connector... as root
2. cat /root/.bashrc


Actual results:
modified /root/.bashrc (contains '*')

Expected results:
old file is kept

Additional info:
File test/Test.java contains:
...
* Attempt to write into a file which is not writable for given user.
...
File f = new File("/root/.bashrc");
try {
   FileOutputStream fos = new FileOutputStream(f);
   try {
      fos.write(42);
Comment 5 Matej Habrnal 2017-01-26 07:58:13 EST
Opened upstream pull request https://github.com/jfilak/abrt-java-connector/pull/46
Comment 6 Matej Habrnal 2017-02-14 07:10:18 EST
Created attachment 1250195 [details]
Patch 1/2: Clearly state that tests cannot be run under root
Comment 7 Matej Habrnal 2017-02-14 07:10:21 EST
Created attachment 1250196 [details]
Patch 2/2: Update tests for rhel-7.4
Comment 12 errata-xmlrpc 2017-08-01 14:15:18 EDT
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:1927

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