Union mount /etc/{,guest-session/}skel, instead of copying it over

Bug #1497311 reported by Laércio de Sousa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Wishlist
Unassigned

Bug Description

Now that OverlayFS is included in Linux kernel since release 3.18, I wonder if it should be considered to use union-mounting of /etc/{,guest-session/}skel with guest-account temporary home directory, instead of just copying it over.

It would make guest login faster and reduce amount of memory consumption, specially if /etc/guest-session/skel has large files (e.g. a populated .wine folder).

It could fall back to AuFS if OverlayFS is not available, and even to copy over if none oy them is available.

It could also be combined with BindFS to do proper UID/GID mapping, so that each guest account can see itself as the owner of /etc/guest-session/skel files (needed for .wine, for example). If all guest-accounts were added to a same group, /etc/guest-session/skel could even be mounted once with BindFS "--mirror=@guest-group" option, before LightDM has started.

Related branches

summary: - guest-account: consider union-mounting /etc/{,guest-session/}skel
+ guest-account: consider union-mounting /etc/{,guest-session/}skel,
instead of copying it over
Revision history for this message
Robert Ancell (robert-ancell) wrote : Re: guest-account: consider union-mounting /etc/{,guest-session/}skel, instead of copying it over

Interesting idea - faster login is desirable. Would this lead to files that couldn't be deleted by the guest account?

Changed in lightdm:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Laércio de Sousa (lbssousa) wrote :

Robert,

Both OverlayFS and AuFS support a feature called *whiteout*. Consider we mount e.g. /tmp/guest-XXXX as a union of /tmp/.rw-guest-XXXX (read-write) on top of /etc/guest-session/skel (read-only). Whenever we remove a file/dir in /tmp/guest-XXXX which, in fact, resides on /etc/guest-session/skel, a whiteout record for this one is marked in /tmp/.rw-guest-XXXX, so that OverlayFS/AuFS keeps track of removal intention and hides this one from /tmp/guest-XXXX union, as if it was actually removed.

Changed in lightdm:
milestone: none → 1.17.0
status: Triaged → Fix Committed
summary: - guest-account: consider union-mounting /etc/{,guest-session/}skel,
- instead of copying it over
+ Union mount /etc/{,guest-session/}skel, instead of copying it over
Changed in lightdm:
status: Fix Committed → Fix Released
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.