Bug 1846 - smbmount does not convert from default DOS character set
smbmount does not convert from default DOS character set
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: smbmount (unmaintained)
3.0.6
x86 Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-28 10:36 UTC by Patrick Monnerat
Modified: 2004-09-29 04:22 UTC (History)
0 users

See Also:


Attachments
My patch for this bug (2.60 KB, patch)
2004-09-28 10:39 UTC, Patrick Monnerat
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Monnerat 2004-09-28 10:36:43 UTC
Description of problem:
On a LAN using CP850 for smb (dos charset in /etc/samba/smb.conf) and 
computers configured in UTF-8 (unix charset = UTF-8), smbmount 
ignores these default configuration parameters and performs no 
conversion.
To make smbmount work, you have to specify -o codepage=cp850

Steps to Reproduce:
1.Configure machine1 as samba server with "dos charset = CP850" 
and "unix charset = UTF-8". Create a share. In this share, create a 
file with accentuated characters in its name 
(i.e.: "sträñgêfìlename").
2. Configure machine2 as samba client with "dos charset = CP850" 
and "unix charset = UTF-8".
3. On machine2, "smbmount //machine1/share /mntdir"
4. On machine2, "ls /mntdir"
    

Actual Results:  list file as "str??g?f?lename".

Expected Results:  list file as "sträñgêfìlename". (Show accentuated 
characters).

Additional info:

As smbclient forks fine this way, smbmount should use the 
configuration character set conversion by default rather than 
performing no conversion at all.

I cannot configure "dos charset = UTF-8" on this LAN because some 
other (old) machines do not support it...


Note: this bug has already been reported to RH/Fedora at 
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130980
I report here again since I suspect the info did not propagate...
Comment 1 Patrick Monnerat 2004-09-28 10:39:17 UTC
Created attachment 684 [details]
My patch for this bug

Here is my proposed patch.
It supports upper/lowercase charset names recognized by the Linux kernel, plus
upper/lower "UTF-8".
Since charset names are interpreted in the kernel, no iconv alias names may be
used
Comment 2 Björn Jacke 2004-09-28 13:28:58 UTC
hm, what is wrong with mount -t smbfs -o codepage=cp850,iocharset=utf8 ?
Doesn't that work for you? 
Comment 3 Patrick Monnerat 2004-09-29 02:12:43 UTC
Of course it works, but:
1) Many GUI softwares (such as LinNeighborhood) use smbmount and do not have 
charset options,
2) Storing mount info for smbfs in fstab is not easy due to the dynamic aspect 
of smb network and I cannot ask "normal" users to type commands like the one y 
ou mention,
3) The new behaviour is more coherent with the other samba programs,
4) This avoids configuration information redundancy (smb.conf + fstab + 
interactive typing + maybe some other configuration entity).
5) AFAIK, there is no drawback to this change !
Comment 4 Björn Jacke 2004-09-29 02:47:37 UTC
sorry, no - iocharset option is coherrent with most other linux filesystems and
smbfs is just another linux filesystem, it's not Samba. If other software does
not correctly handle the needed options, that software should be fixed. Settings
mount options in fstab is also not a big deal.
Comment 5 Patrick Monnerat 2004-09-29 03:21:31 UTC
This is not an smbfs issue, but an smbmount issue.

smbclient //machine1/share
ls

does the job properly (i.e.: using the defaults from smb.conf) without having 
to specify the charsets; but smbmount doesnt. Since both programs are user 
interfaces to some smb filesystems and members of the same package (samba!), I 
think they should use the same common default options.
Comment 6 Björn Jacke 2004-09-29 04:22:16 UTC
there are kernel configuration parameters, which specify the default for smbfs.
Please use that. It does make no sense to override defaults by defaults,
especially if smbfs is not related to samba. Unfortunately smbmount is part of
the samba suite yes.