Provide persistent data sharing folder for greeters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Light Display Manager |
Fix Released
|
Medium
|
Unassigned |
Bug Description
So there are a few features in Ubuntu Touch that want persistent storage that is only read/write-able by the greeter and the user. Like:
* Contact photos for incoming calls (shared by telephony-service for the greeter to display on incoming call).
* Screenshots of the home screen (not needed yet, but might be done for showing what login will look like for encrypted home directories before we log in for the first time and have access to the session).
* User data like photos taken when the greeter is open, but then pushed to user session once the user is logged in.
So these could all be fixed if LightDM did the following:
* mkdir -p /var/lib/
* chmod o+x /var/lib/lightdm /var/lib/
* for each visible user:
* mkdir -p /var/lib/
* chown $USER:lightdm /var/lib/
* chmod 770 /var/lib/
i.e. this is basically a persistent /run/user shared with the lightdm user (or whichever user is set as the greeter user; I recall that is configurable).
The greeter can't set something like this up, because it doesn't have permission to chown anything that could be shared with the user (it's not in any of the user's groups). And we don't want these folders to be world-readable.
Is this something you would support? If so, I can start on a patch. I just wanted to discuss approaches first.
description: | updated |
Changed in lightdm: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in lightdm: | |
status: | Triaged → Fix Released |
Short answer - yes, this seems like a useful feature.
Thoughts: unity-greeter/ photos/ *"?
- Obviously this sound like something that ideally accounts service would provide. But a-s seems to be only for public information and this is private to two parties, one of which is a bit lightdm specific so fitting it into LightDM instead seems a lot easier. Also, a-s doesn't seem to be universally adopted so nice to not depend on more complex a-s behaviour
- Having an unstructured data storage that lasts forever makes me a little uneasy (see more below)
- We need to be careful not to collect crap in these directories, either by having directories for users who no longer exist or files that have been forgotten about - perhaps we could consider putting an expiry on each file somehow?
- We need to support multiple greeters/sessions writing to this directory - some sort of defined directory structure like "com.canonical.
- Events via the filesystem is racy. It would be nice to have some sort of notification system to synchronise this (no easy solution comes to mind).
- From the greeter side we should consider some helper functions into liblightdm to encourage correct usage. From the session side it's a bit harder.