Merge lp:~lbssousa/lightdm/guest-account-union-mount-skel into lp:lightdm

Proposed by Laércio de Sousa
Status: Merged
Merged at revision: 2201
Proposed branch: lp:~lbssousa/lightdm/guest-account-union-mount-skel
Merge into: lp:lightdm
Diff against target: 12 lines (+1/-1)
1 file modified
debian/guest-account.sh (+1/-1)
To merge this branch: bzr merge lp:~lbssousa/lightdm/guest-account-union-mount-skel
Reviewer Review Type Date Requested Status
Robert Ancell Pending
Review via email: mp+274231@code.launchpad.net

This proposal supersedes a proposal from 2015-10-08.

Description of the change

[UPDATE] Robert, could you please update this merge with a last-minute patch to add a -r (read-only option) for bindfs mounts? Consider also including packages "bindfs" and "linux-image>=3.18 (to ensure overlayfs is available) | aufs-tools" in "Suggests:" field for lightdm package.

This patch proposes an alternative mechanism to customize guest sessions, based on union-mounting /etc/guest-session/skel with guest home directory, rather than just copying over contents from one to the other.

It *may* turn guest logins a bit faster (I've never measured it, however), and it avoids copying large files from /etc/guest-session/skel (e.g. a whole .wine directory) to a limited tmpfs home for guest accounts.

For each guest account created, it wraps /etc/guest-session/skel in a dedicated BindFS mount, so that the account in question will see itself as the owner of that directory's contents. If BindFS is not available, it will fall back directly to current copy over method.

If OverlayFS kernel module is available in the system, use it. However, if only AuFS is available, use it instead. If none of them is available, fall back to current copy over method. If /etc/guest-session/skel is not available, nothing changes: it'll continue copying over from /etc/skel (no union-mounting will be performed in this case).

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote : Posted in a previous version of this proposal

Looks good!

review: Approve
Revision history for this message
Laércio de Sousa (lbssousa) wrote : Posted in a previous version of this proposal

Robert, could you please update this merge with a last-minute patch to add a -r (read-only option) for bindfs mounts? Consider also including packages "bindfs" and "linux-image>=3.18 (to ensure overlayfs is available) | aufs-tools" in "Suggests:" field for lightdm package.

Revision history for this message
Robert Ancell (robert-ancell) wrote : Posted in a previous version of this proposal

Can you do another MP for these changes? It will be easier as you know the exact changes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/guest-account.sh'
2--- debian/guest-account.sh 2015-10-09 19:38:57 +0000
3+++ debian/guest-account.sh 2015-10-13 10:34:11 +0000
4@@ -69,7 +69,7 @@
5
6 # Wrap ${gs_skel} in a BindFS mount, so that
7 # guest account will see itself as the owner of ${gs_skel}'s contents.
8- bindfs -M $USER $gs_skel ${PRE_HOME}/lower || {
9+ bindfs -r -M $USER $gs_skel ${PRE_HOME}/lower || {
10 rm -rf "$PRE_HOME"
11 rm -rf "$HOME"
12 exit 1

Subscribers

People subscribed via source and target branches