Ressources documentaires pour Mandriva Linux et les Logiciels Libres

Debugging Firefox autoconfig feature under Mandriva 2009.1

I’ve begun to test the migration of my Mandriva 2008.1 workstations to Mandriva 2009.1. While doing this, I noticed that I could no longer enforced settings on firefox : /etc/firefox.cfg was ignored. Indeed, under Mandriva, putting lockPref statements in /etc/firefox.cfg was enough, and we didn’t have to encrypt it. Now let’s try debugging this and see how we can fix this and allow Mandriva firefox to correctly support autoconfig.

When looking at this, the closest bug report I found on internet was the following : rh bug #442406 : Cannot read MCD configuration file. Indeed if I add the general.config.filename directive in for example %_libdir/xulrunner-1.9/defaults/pref/vendor.js, I will have the exact same error message : « Failed to read the configuration file. Please contact your system administrator. »

Using debugging shows that the content of vendor.js is read :

[telepro11@superviseur6 ~]$ NSPR_LOG_FILE=mcd.log NSPR_LOG_MODULES=MCD:5 AUTOCONFIG_DEBUG=1 firefox
[telepro11@superviseur6 ~]$ cat mcd.log

-1211701024[8ccf808]: general.config.filename = /etc/firefox.cfg

As advised in rh bug #442406 I do a symlink of %_libdir/xulrunner-1.9/defaults/autoconfig/ in %_libdir/firefox-3.0.8/defaults/, Whereas I still have the same error message, the debug log content is different :

[root@superviseur6 ~]# ln -s /usr/lib/xulrunner-1.9/defaults/autoconfig /usr/lib/firefox-3.0.8/defaults/
[telepro11@superviseur6 ~]$ NSPR_LOG_FILE=mcd.log NSPR_LOG_MODULES=MCD:5 AUTOCONFIG_DEBUG=1 firefox
[telepro11@superviseur6 ~]$ cat mcd.log
-1211115296[896f808]: general.config.filename = /etc/firefox.cfg
-1211115296[896f808]: evaluating .cfg file /etc/firefox.cfg with obscureValue 13
-1211115296[896f808]: error evaluating .cfg file /etc/firefox.cfg 80520001

As you can see, even using a full path won’t help. At least the general.config.obscure_value in %_libdir/xulrunner-1.9/greprefs/all.js is now correctly analyzed. If I use 0 as value, I still have the same error, but the log clearly show that 0 is used.

To allow firefox to start, I have to symlink /etc/firefox.cfg to %_libdir/firefox-3.0.8, and then everything will work fine, and the settings in firefox.cfg will be enforced/applied :

ln -s /etc/firefox.cfg /usr/lib/firefox-3.0.8/
NSPR_LOG_FILE=mcd.log NSPR_LOG_MODULES=MCD:5 AUTOCONFIG_DEBUG=1 firefox
[telepro11@superviseur6 ~]$ cat mcd.log
-1211705120[8b21808]: general.config.filename = firefox.cfg
-1211705120[8b21808]: evaluating .cfg file firefox.cfg with obscureValue 0

So, to use Firefox autoconfig features in Mandriva 2009 Spring while keeping the behavior of pre-Mandriva 2009.1 releases, you need to do the following :

  1. symlinks %_libdir/xulrunner-1.9/defaults/autoconfig/ in %_libdir/firefox-3.0.8/defaults/
  2. add in %_libdir/xulrunner-1.9/defaults/pref/vendor.js the following statements :

    pref(« general.config.filename », « firefox.cfg »);
    pref(« general.config.obscure_value », 0);
  3. symlinks /etc/firefox.cfg in %_libdir/firefox-3.0.8/

Please note that using that setting general.config.obscure_value=0 is needed, or else while Firefox will load, settings in firefox.cfg won’t be read correctly and settings like the proxies ones won’t be enforced ( the user have the ability to modify them and thus even if we use lockPref ). The following bug report have been opened ( mdv bug #50829 ).

]]

Aucun commentaire jusqu'à présent.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Catégories

My Tweets