Bug 1141485 - abrt should not use/create /.cache folder
Summary: abrt should not use/create /.cache folder
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Jakub Filak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1139001
TreeView+ depends on / blocked
 
Reported: 2014-09-13 22:30 UTC by Christian Stadelmann
Modified: 2016-12-01 00:47 UTC (History)
8 users (show)

Fixed In Version: abrt-2.2.2-9.fc22
Clone Of:
Environment:
Last Closed: 2014-10-03 12:43:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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