From nobody@FreeBSD.org  Mon Mar  6 17:24:55 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id 00FEB37BB59
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  6 Mar 2000 17:24:55 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id RAA00753;
	Mon, 6 Mar 2000 17:24:54 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200003070124.RAA00753@freefall.freebsd.org>
Date: Mon, 6 Mar 2000 17:24:54 -0800 (PST)
From: odip@bionet.nsc.ru
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: in samba suite smbclient -M worked incorrectly on non english codepages [patch]
X-Send-Pr-Version: www-1.0

>Number:         17237
>Category:       ports
>Synopsis:       in samba suite smbclient -M worked incorrectly on non english codepages [patch]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dwcjr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar  6 17:30:01 PST 2000
>Closed-Date:    Wed Jun 20 06:25:44 PDT 2001
>Last-Modified:  Wed Jun 20 06:26:30 PDT 2001
>Originator:     Dmitry Grigorovich
>Release:        3.4-RELEASE
>Organization:
ICiG
>Environment:
FreeBSD comp1.bionet.nsc.ru 3.4-RELEASE FreeBSD 3.4-RELEASE #0: Tue Mar  7 05:21
:38 NOVT 2000     root@comp1.bionet.nsc.ru:/usr/src/sys/compile/ODIP  i386

>Description:
When using samba suite
my locale on UNIX is ru_RU.KOI8-R and locale on Windows is cp1251
In smb.conf all locales correctly specified

When I send message in cyrrilic via "smbclient -M name"
then it incorrectly appear on my WindowNT in strange codepage !

Explanation:

Text saved to buffer on UNIX,
but not translated to Windows codepage
and sended in UNIX codepage to Windows machine !!!

>How-To-Repeat:
When you codepage on UNIX is not same,
such as on Windows machine just send message to windows machine:
"smbclient -M name"
and type any non english characters,
e.g. cyrillic letters
>Fix:
--- client/client.c.orig        Thu Nov 11 08:35:59 1999
+++ client/client.c     Tue Mar  7 05:59:04 2000
@@ -194,6 +194,10 @@
                                msg[l++] = '\r';
                        msg[l] = c;
                }
+               msg[l]= '\0';
+
+                /* input language code to internal one */
+               CNV_INPUT(msg);

                if (!cli_message_text(cli, msg, l, grp_id)) {
                        printf("SMBsendtxt failed (%s)\n",cli_errstr(cli));



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->hosokawa 
Responsible-Changed-By: ade 
Responsible-Changed-When: Thu Mar 9 12:04:16 PST 2000 
Responsible-Changed-Why:  
Over to maintainer. 
Responsible-Changed-From-To: hosokawa->dwcjr 
Responsible-Changed-By: dwcjr 
Responsible-Changed-When: Mon Jun 18 20:46:04 PDT 2001 
Responsible-Changed-Why:  
I'm new maintainer 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17237 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: freebsd-gnats-submit@FreeBSD.org, odip@bionet.nsc.ru
Cc:  
Subject: Re: ports/17237: in samba suite smbclient -M worked incorrectly on non english codepages [patch]
Date: Mon, 18 Jun 2001 22:48:19 -0500

 Could you remake the diffs against samba and samba-devel?
 

From: "Dmitry Grigorovich" <odip@bionet.nsc.ru>
To: <freebsd-gnats-submit@FreeBSD.org>, <odip@bionet.nsc.ru>
Cc:  
Subject: Re: ports/17237: in samba suite smbclient -M worked incorrectly on non english codepages [patch]
Date: Wed, 20 Jun 2001 15:32:08 +0700

 samba-2.0.9 and samba-devel does not contains this bug !
 because UNIX codepage translated to DOS codepage before sending
 
 [ODiP] == Dmitry Grigorovich
 
State-Changed-From-To: open->closed 
State-Changed-By: dwcjr 
State-Changed-When: Wed Jun 20 06:25:44 PDT 2001 
State-Changed-Why:  
Latest ports do not contain this bug. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17237 
>Unformatted:
