dflemstr
It's a ball.
WizardStan said:There were three use cases you provided beyond the original "click to run" that you wanted for the PND format.dflemstr said:The system as it is planned to be at the moment cannot compromise the system, with or even without the need for root passwords and user authentication. As said above, the whole merged environment can be put anywhere, it's very easy to constrain the pnddaemon so that it's only allowed to overlay certain directories (you could even enforce this on a kernel level), and no PNDs are able to provide daemons that will be launched at boot.
1) Start daemons like Apache automatically
2) Install icon themes
3) Extra libraries and codecs
By your design, (1) is completely out. It's a use case that can never be achieved.
I was actually expecting a different response to the /etc/rc problem, and was preparing an argument that would render (2) useless as well, but simply rejecting overlays to /etc/rc solves that problem, even if it does eliminate one of the other use cases.
Except that right now it's /etc/rc. What happens if someone else thinks up a way of abusing a different directory? Block that one as well?
For some reason, inclusive feels better than exclusive: "you can overlay into these directories, adding more overtime as needed" sounds safer than "you cannot write into these directories, adding more as flaws are found".
OK; read the posts I made while you were posting (or deliberately skipped, but I don't think that ).
So, you say that it would be good if we'd be inclusive and not exclusive...
Imagine the follwing scenario, then:
1. First, create a setup like this (this is before the UnionFS comes into play):
Code:
/ - The real root directory of the system
dev
shm
overlays - Where all the PND symlinks are copied into (a ramdisk)
usr
lib
lib.so.2 -> /mnt/pnd01/lib.so
mnt
pnd01 - A mounted PND
lib.so
overlay
usr
lib
lib.so.2 -> /lib.so
usr
etc
var
pnd
root - What will become the overlay version of the system
original - The directory with exposed directories
usr => /usr - This is a HARDLINK, not a symlink, as shown by the => arrow.
lib => /lib
home => /home
etc - We want to only allow parts of etc to be "changed" by PNDs
gtk-2.0 => /etc/gtk-2.0
...and so on...
Now, with "mount -t unionfs -o dirs=/dev/shm/overlays:/pnd/original none /pnd/root", the contents of /pnd/original and /dev/shm/overlays will be merged, and the result shown in /pnd/root. It would thus look like this:
Code:
/
...same as above, completely unchanged...
pnd
root
usr
...all the contents of /usr
lib
...all the contents of /usr/lib
lib.so.2 -> /mnt/pnd01/lib.so
lib
...all the contents of /lib
home
...all the contents of /home
etc
gtk-2.0
...all the contents of /etc/gtk-2.0
...and that would be it. Perfectly safe, and perfectly stable if you chroot PNDs into /pnd/root. You get almost the same power as you get with AppArmor, just by using symlinks, hardlinks, and UnionFS.
Last edited by a moderator: