motd-legal files don't respect XDG_CACHE_HOME

Bug #467300 reported by Sense Egbert Hofstede
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pam (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: base-files

The files $XDG_CACHE_HOME/motd.legal-displayed and $XDG_CACHE_HOME/motd/legal-displayed don't respect the value of XDG_CACHE_HOME, they will always be stored in ~/.cache.

Tags: xdg-user-dir
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

This would actually need to be changed in pam's pam_motd module. See the patch: ./debian/patches-applied/pam_motd-legal-notice in the pam source package.

I'm not volunteering to fix this, but I am triaging this bug and marking it wishlist, if an enterprising ubuntu user/developer comes along with a better patch, I'll gladly review and sponsor ;-)

Changed in base-files (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
affects: base-files (Ubuntu) → pam (Ubuntu)
tags: added: xdg-user-dir
Revision history for this message
Steve Langasek (vorlon) wrote :

What is the actual use case for making the directory motd.legal-displayed is written to configurable? This seems only to introduce the risk of accidentally displaying the motd multiple times if the target of $XDG_CACHE_HOME changes (or is unset), and as the file is a 0-byte stamp file there should be no concerns about impacting the size of disk backups. Where do you want this file instead of ~/.cache, and why?

Revision history for this message
John Drinkwater (johndrinkwater) wrote :

Reasons to want this ‘configurable’ is to match the rest of the system, as this is one of the few remaining binaries that writes into ~/.cache
john@joran ~ ❯ tree .cache
.cache
├── motd.legal-displayed
└── upstart

As everything else already behaves:
john@joran ~ ❯ set | grep XDG_.*_HOME
XDG_CACHE_HOME=/home/john/settings/cache
XDG_CONFIG_HOME=/home/john/settings/config
XDG_DATA_HOME=/home/john/settings/data
XDG_STATE_HOME=/home/john/settings/state
john@joran ~ ❯ tree $XDG_CONFIG_HOME | wc
   2525 11435 126830

Current solution is having this module not run instead.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.