We need to make sure that ThinLinc can operate properly even when the umask is set to something restrictive for our services. We did a quick fix for bug 4826, bug 4580 and bug 5034 in r28979 that we probably want to clean up. Our mkhomedirs function is also broken with regard to umask. Probably want to see if there is something else affected. There are two main lines of fixing this: a) Set a nice umask during startup. Avoids having to fix each and every place. Not sure what risk there is of inheriting this though. PulseAudio uses this approach. b) Compensate where relevant by changing umask or explicitly call chmod(). sshd and gdm uses this approach.