unfsd does not support exporting a directory which is a symbolic link to another
directory. For example, on Neoware terminals, /tmp is a symlink to /var/tmp. In
this case, the user must export /var/tmp rather than /tmp.
We should fix this, or at least document it.
This problem is more severe than I first realized. unfsd currently exports the
symlinks themselves; not the object it points to. This is a major problem with
VXL Itona terminals: USB sticks are mounted on, say,
/tmp/.diskmount/USB/Cruzer_Micro. A symbolic link called
/tmp/browse/usb_Cruzer_Micro points to this directory. With this setup, it's
impossible to export the USB drive with ThinLinc:
1) If you export /tmp/browse, then the symlink itself will be exported, and the
path /tmp/.diskmount/USB/Cruzer_Micro doesn't exist on the terminal server...
2) You cannot export /tmp/browse/usb_Cruzer_Micro, since it's a symlink. And
even if you could, it would make no sense, since different USB sticks have
3) You can export /tmp/.diskmount/USB, but the directory Cruzer_Micro is not
visible until you try to access it (as automounters usually works). Thus, the
user would not be able to browse to the USB stick.
4) You can export /tmp/.diskmount/USB/Cruzer_Micro, but then, this export will
only work with USB devices that identifies as Cruzer_Micro.
If I remember correctly, eLux solves the problem by defining the mountpoints
"usb0", "usb1" etc. We should re-check this.
Sigh. I have no idea to solve this properly. Of course, it would be possible to
change unfsd so that it interprets symlinks locally, but sometimes, this is not
what you want.
One idea could be to have a unfsd "server-wide" configuration parameter that
controls if symlinks should be resolved locally or not. We could take a look at
Sambas options for some inspiration.
Perhaps to 1.4.1.
I think we should implement what's suggested in comment 2: A "server" wide
configuration parameter. It should be an option to unfsd, and also an option in
the tlclient GUI.
One problem with a simple boolean "follow symlinks" option is that it makes it
impossible to use symlinks on, say, removable media. For example, assume that
you inserts a USB stick in a VXL terminal with a symlink "foo" that points to
"bar". If unfsd is configured to always follow symlinks locally, it would
present both "foo" and "bar" as normal files, which might confuse users or even
break some applications.
For VXL, I think that what we want is to export /tmp/browse, and follow symlinks
but only in this directory - not deeper. That would allow usage of symlinks of
mounted drives. This option should still be configurable, though, but I'm not so
sure anymore that it should be global.
Allow following symlinks on the mountpoint itself is probably always a good
idea. I don't see why it shouldn't be hardcoded.
When solving bug 2337, I had to manually resolve the chain of symlinks. /usb/usb-drive eventually ended up as /tmp/config/user_mount/usb/.autofs/usb-drive.auto. Besides being clumsy and ugly, there's a risk that this path changes in the future. It would be much nicer if we could use the documented paths.
When solving this bug, the interim solution added on bug 5196 should be removed.