Comment 137 for bug 233901

Revision history for this message
In , Jehan-procaccia (jehan-procaccia) wrote :

that works :-)

Indeed I hadn't rebuilt my firefox 1.0.4 with ldap enable (removed
--disable-ldap !). However I did do it in 1.0.3 where I finnaly ened on "Error:
getLDAPAttributes failed: TypeError:" ... ??

Anyway, it does work now for my fresly built firefox .
demonstration:

for a minimun debug:
$ export NSPR_LOG_MODULES=MCD:5
$ export NSPR_LOG_FILE=~/firefox.log

[root@calaz /usr/lib/firefox-1.0.4]
$ tail -6 greprefs/all.js
// autoconfig jehan
pref('general.config.obscure_value', 0);
pref('general.config.filename', 'firefox.cfg')

firefox.cfg:

try {
var env_user = getenv("USER");
//ldap values
function processLDAPValues (values) {
 if(values) {
      ldap_values = values;
    var cn = getLDAPValue ( values ,"cn" );
    var mail = getLDAPValue ( values ,"mail" );
    var URL = getLDAPValue ( values ,"labeledURI" );
//set the firefox home page to the personnal user's page retrived from ldap
lockPref("browser.startup.homepage", URL );
    }
  }
// ldap querie
  getLDAPAttributes("ldap3.int-evry.fr","ou=people,dc=int-evry,dc=fr","uid=" +
env_user,"uid,cn,mail,labeledURI");
} catch(e) {displayError("lockedPref", e);}

openldap log when firefox start, I do see the querie

May 25 12:07:08 babylone slapd[8948]: conn=161 op=1 SRCH
base="ou=people,dc=int-evry,dc=fr" scope=2 filter="(uid=procacci)"
May 25 12:07:08 babylone slapd[8948]: conn=161 op=1 SRCH attr=cn mail labeledURI

when firefox shows up I do start on my homepage as recoreded in ldap :-)

Just a remark, the firefox.log do show the read of firefox.cfg , but then I get
warnings that I don't really understand ... I suppose I get these because I
recompile firefox with enable debug !

$ cat firefox.log
-1209947296[8067548]: general.config.filename = firefox.cfg
-1209947296[8067548]: evaluating .cfg file firefox.cfg with obscureValue 0
-1209947296[8067548]: WARNING: chrome: failed to get base url for
chrome://autoconfig/locale/autoconfig.properties -- using wacky default, file
nsChromeRegistry.cpp, line 531
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsPermissionManager.cpp, line 623
-1209947296[8067548]: WARNING: the property eo already exists
, file nsPersistentProperties.cpp, line 282
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsSyncLoadService.cpp, line 633
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsXBLService.cpp, line 1236
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsSyncLoadService.cpp, line 633
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsXBLService.cpp, line 1236
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsSyncLoadService.cpp, line 633
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsXBLService.cpp, line 1236
-1209947296[8067548]: WARNING: requested removal of nonexistent window
, file nsWindowWatcher.cpp, line 944
-1209947296[8067548]: WARNING: nsExceptionService ignoring thread destruction
after shutdown, file nsExceptionService.cpp, line 191
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsGlobalHistory.cpp, line 2520
-1209947296[8067548]: WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(OpenDB())) failed,
file nsGlobalHistory.cpp, line 1221
-1209947296[8067548]: ###!!! ASSERTION: Component Manager being held past XPCOM
shutdown.: 'cnt == 0', file nsXPComInit.cpp, line 839
-1209947296[8067548]: ###!!! Break: at file nsXPComInit.cpp, line 839

Is this still a problem ?

Now I'all have to make the same thing run with thunderbird
follow the thread comming in in: https://bugzilla.mozilla.org/show_bug.cgi?id=225288
thanks.