the-linux-schools-project / karoshi-client

Central repository for Karoshi Client development
http://linuxschools.org.uk
5 stars 6 forks source link

Add lockdowns for Firefox preferences #106

Closed Eldara98 closed 9 years ago

Eldara98 commented 9 years ago

This commit takes into account the ability of Firefox to use autoconfig files to lockdown preferences, and currently locks down the homepage and the ability of users to install extensions (which is disabled).

Tested by myself and this does work.

RobinMcCorkell commented 9 years ago

If possible, move the files to /var/lib/karoshi and symlink them into /usr/lib. In some circumstances /usr is mounted read only, which won't work for writing into it.

Eldara98 commented 9 years ago

Updated, and now using heredocs for mozilla.cfg

cc: @Xenopathic

RobinMcCorkell commented 9 years ago

Couple of changes needed. There shouldn't be that if around the code: this code needs to run every boot. In addition, what happens if no proxy server is defined? Check for that, and use about:home if there is no proxy set: see https://github.com/the-linux-schools-project/karoshi-client/blob/master/linuxclientsetup/scripts/pre-session#L300. You'll also need to remove the corresponding entries from pre-session or prefs.js in the skel for this to have any effect.

But while you are at it, how about migrating some of the other preferences over? The entire proxy configuration section can be put here (but probably just pref not lockPref, as it's useful to manually override sometimes). Or the various assorted gubbins like browser cache size, version override and Kerberos configuration.

Once you've done that, it might be worthwhile to look through prefs.js and migrate the essential settings over. A lot of stuff in there is autogenerated though, so it won't all be necessary. If you get a lot of static settings (aka stuff that doesn't depend on a variable being set or whatever) then put those settings into a new config-files file, which gets cat'ed into the final file in client-config. That way you can avoid having a lot of static stuff in an already cluttered script.

RobinMcCorkell commented 9 years ago

:+1: