sequence about calling handle_client_code_page

monyo at home.monyo.com monyo at home.monyo.com
Mon Dec 13 23:51:50 GMT 1999


Hi.

I've found another problem around i18n'ed Samba in latest SAMBA_2_0 CVS.
Now we can use SJIS'ed Japanese strings in netbios aliases and netbios
name in smb.conf. And you can use the name with UNC. But in Network
Computer folder, these names are often broken, because...

(1) If you create smb.conf with swat, parameters are written in order
  as

  netbios name = XXXX (Some Japanese EUC string)
  netbios aliases = XXXX (Some Japanese EUC string)
  server string = XXXX (Some Japanese EUC string)
  ....
 
  coding system = EUC
  client codepage = 932

(2) When do_parameter() in source/param/loadparm.c is called by
  lp_load() in source/param/loadparm.c and stores netbios
  {name,aliases} in Globals structure, handle_client_code_page() in
  source/param/loadparm.c  is not called yet, and no Kanji code
  conversion are done at unix_to_dos() in lp_do_parameter() in
  source/param/loadparm.c. 

(3) After that do_parameter() stores "coding system" parameter and
  handle_client_code_page() is called.


If you set "client codepage = SJIS", this problem does not occur,
because SJIS is the Kanji code that Windows clients use. 

If you create smb.conf like

  coding system = EUC
  client codepage = 932
  ....

  netbios name = XXXX (Some Japanese EUC string)
  netbios aliases = XXXX (Some Japanese EUC string)
  server string = XXXX (Some Japanese EUC string)
 
,this problem does not occur, so you can solve this problem to change
the order of parameters defined at parm_table[] in
source/param/loadparm.c

There will occur same problem about "workgroup" parameter, but I've
not tested yet. 

-----
Motonobu TAKAHASHI                    mailto:monyo at home.monyo.com
                                      http://home.monyo.com/




More information about the samba-technical mailing list