Bug 1141485

Summary: abrt should not use/create /.cache folder
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: abrtAssignee: Jakub Filak <jfilak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: abrt-devel-list, dvlasenk, iprikryl, jberan, jfilak, mhabrnal, mmilata, mtoman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: abrt-2.2.2-9.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-03 12:43:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1139001    

Description Christian Stadelmann 2014-09-13 22:30:15 UTC
Description of problem:
abrt creates a file /.cache/abrt/lastnotification
This should not happen. Instead it should create the file under /var/cache/abrt/ or /root/.cache/abrt/ where abrt uses the cache anyways.

Version-Release number of selected component (if applicable):
abrt 2.2.2-1.fc20 

How reproducible:
always


Steps to Reproduce:
start the abrt daemon (started by default)

Additional Info:
According to the source code [1] this happens when $HOME is not set. I don't know when this happens (as root ususally has $HOME set to /root) but it happens. It seems like abrt is started before env is fully initialized. This might be no bug in abrt but somewhere else (systemd?)

[1] https://github.com/abrt/abrt/blob/ed4889a23a436cc6db3e753f25a9fc9f8ffa537b/src/cli/abrt-console-notification.sh

Comment 1 Jakub Filak 2014-09-15 05:34:57 UTC
Thank you for taking the time report this issue. abrt-console-notification.sh is run by bash during log in and empty $HOME env has several causes (e.g. user doesn't have home directory). I'm going to enhance the script to exit immediately if $HOME is not set.

Comment 2 Jakub Filak 2014-09-15 06:18:20 UTC
(In reply to Jakub Filak from comment #1)
Um, sorry for misleading you, I wanted to say that it isn't necessarily a bug when running an /etc/profile.d script without $HOME env, but it's definitely a bug in abrt-console-notification.sh to create /.cache directory.

Comment 3 Jakub Filak 2014-09-15 11:31:35 UTC
Upstream commit https://github.com/abrt/abrt/commit/592b7e19a20b38547c5b3c5d81add27ed79e05a9 fixes this bug.

Comment 4 Christian Stadelmann 2014-09-15 19:41:38 UTC
Thanks for the fast fix!

by the way: Is $HOME not being set considered a bug? I have at least another application (esmtp called by smartmontools) which shows similar behavior.