Now that bug #1497311 has already "fix commit", I'm investigating some optimizations for guest-account creation in this new scenario. To the moment, I've listed the following itens:
1. Minimize the number of "chown -R" calls: if one has a large number of files in the union's bottom layer, such a call can take a long time.
2. Minimize the number of files created on-the-fly by guest-account script: some of them are always the same and could be created only once, prior to any guest-account call. I have two alternatives for such files:
a) Ship them with lightdm package: they could be installed in /usr/share/lightdm/guest-session/skel or any other suitable location.
b) Create them on the first time guest-account script is executed, and save them in /var/cache/lightdm/guest-session/skel or any other suitable location.
In both cases, we can rely on multi-layer mounting (supported by both OverlayFS and AuFS). The only change needed here is moving the bindfs mount to the last step (obviously, we need to drop read-only option), so we can get the right UID/GID translation of the entire union. We can mount the union with the following stack:
/tmp/.pre-guest-XXXXXX/upper (RW)
/etc/guest-session/skel (RO)
/usr/share/lightdm/guest-session/skel or /var/cache/lightdm/guest-session/skel (RO)
Now that bug #1497311 has already "fix commit", I'm investigating some optimizations for guest-account creation in this new scenario. To the moment, I've listed the following itens:
1. Minimize the number of "chown -R" calls: if one has a large number of files in the union's bottom layer, such a call can take a long time.
2. Minimize the number of files created on-the-fly by guest-account script: some of them are always the same and could be created only once, prior to any guest-account call. I have two alternatives for such files:
a) Ship them with lightdm package: they could be installed in /usr/share/ lightdm/ guest-session/ skel or any other suitable location.
b) Create them on the first time guest-account script is executed, and save them in /var/cache/ lightdm/ guest-session/ skel or any other suitable location.
In both cases, we can rely on multi-layer mounting (supported by both OverlayFS and AuFS). The only change needed here is moving the bindfs mount to the last step (obviously, we need to drop read-only option), so we can get the right UID/GID translation of the entire union. We can mount the union with the following stack:
/tmp/.pre- guest-XXXXXX/ upper (RW) session/ skel (RO) lightdm/ guest-session/ skel or /var/cache/ lightdm/ guest-session/ skel (RO)
/etc/guest-
/usr/share/