[Thinlinc-technical] tl-homecreatefilter

Peter Åstrand astrand at cendio.se
Wed May 23 14:16:10 CEST 2007

On Mon, 21 May 2007, John Johansson wrote:

> When I connect to the thinlinc desktop via the windows client, and have
> checked export local drives as rw, I can only save documents or create folders
> directly under /home/testho00/thindrives/c or /home/testho00/thindrives/d and
> not to a subdirectory thereof. (c and d correpsonds to the two local drvies i
> have mounted, but the error could just aswell be an usb drive etc.)

This is strange. homecreatefilter should only restrict ~ and ~/Desktop. 
Or, technically, directories with the same device and inode number as ~ 
and ~/Desktop. 

> If I enter a subdirectory to the above mentioned paths, i get an  access
> denied message when trying to save or create something new. 

Which application or tool are you using? I suggest trying something simple 

cp /bin/ls ~/thindrives/c/subdir

> But, yes there's a but, I can move objects, files and folders, into any 
> subdirectory, but not copy or symlink to them, if I try any of the 
> latter, i get the same access denied error as metioned.

Currently, homecreatefilter only overloads and restricts these library 
calls: mkdir, fopen, fopen64, creat, open, open64. 

I guess we should also limit access and symlink. I've opened up bug 2462 
for this.

> An excerpt from /var/opt/thinlinc/sessions/testho00/last/xinit.log (It might
> be unrelated but i might aswell included it):
>    *ERROR: ld.so: object 'libhomecreatefilter.so' from LD_PRELOAD
>    cannot be preloaded: ignored.*

Yes, this is probably unrelated. This error message is printed when 
executing a setuid program. It means that the homecreatefilter is ignored 
for this program. 

> */opt/thinlinc/etc/homecreatefilter.conf:
> I have tried inlcuding "thindrives" in the above configuration but with no
> effect.

This shouldn't be necessary, since homecreatefilter only tries to restrict 
~ and ~/Desktop. 

There are two things you can do to debug this problem:

1) Check the device and inode numbers, by running:

stat ~ ~/Desktop ~/thindrives/c/subdir

If the "Device" and "Inode" fields for ~/thindrives/c/subdir matches ~ or 
~/Desktop, then this looks like some kind of kernel bug. 

2) You can enable debugging by setting the environment variable 

Good luck, 
Peter Åstrand		ThinLinc Chief Developer
Cendio AB		http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping	Phone: +46-13-21 46 00

More information about the Thinlinc-technical mailing list